The if statement did not match the assignment order.
Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/deabbf73 Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/deabbf73 Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/deabbf73 Branch: refs/heads/prestonc/hash_join Commit: deabbf7307f5612e4f8a0c0c3efb03c5c290f2bf Parents: 3d64ae3 Author: Preston Carman <[email protected]> Authored: Tue Apr 1 17:08:38 2014 -0700 Committer: Preston Carman <[email protected]> Committed: Tue Apr 1 20:56:26 2014 -0700 ---------------------------------------------------------------------- .../vxquery/datamodel/accessors/atomic/XSDecimalPointable.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/deabbf73/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java ---------------------------------------------------------------------- diff --git a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java b/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java index 0ebcd29..8aca4a0 100644 --- a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java +++ b/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java @@ -70,9 +70,9 @@ public class XSDecimalPointable extends AbstractPointable implements IHashable, // TODO double check that precision is not being lost. int diff = p - op; if (diff > 0) { - v = Math.round(v / Math.pow(10, diff)); - } else if (diff < 0) { ov = Math.round(ov / Math.pow(10, diff)); + } else if (diff < 0) { + v = Math.round(v / Math.pow(10, diff)); } return v < ov ? -1 : (v > ov ? 1 : 0);
