You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2014/04/02 06:11:53 UTC

[13/50] [abbrv] git commit: Removed change to comparator factory provider.

Removed change to comparator factory provider.

The change removed all the result for the join operation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/d61f5bd4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/d61f5bd4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/d61f5bd4

Branch: refs/heads/prestonc/hash_join
Commit: d61f5bd4680fb04b9f6925723f18842f5a45d75d
Parents: 6d0b66b
Author: Preston Carman <pr...@apache.org>
Authored: Wed Mar 12 13:19:40 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:24 2014 -0700

----------------------------------------------------------------------
 .../VXQueryComparatorFactoryProvider.java       | 36 +-------------------
 1 file changed, 1 insertion(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d61f5bd4/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
index b473d69..5a0e2df 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
@@ -16,9 +16,7 @@
  */
 package org.apache.vxquery.compiler.algebricks;
 
-import org.apache.vxquery.datamodel.accessors.SequencePointable;
 import org.apache.vxquery.datamodel.accessors.TaggedValuePointable;
-import org.apache.vxquery.datamodel.values.ValueTag;
 
 import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
 import edu.uci.ics.hyracks.algebricks.data.IBinaryComparatorFactoryProvider;
@@ -45,44 +43,12 @@ public class VXQueryComparatorFactoryProvider implements IBinaryComparatorFactor
         public IBinaryComparator createBinaryComparator() {
             final TaggedValuePointable tvp1 = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
             final TaggedValuePointable tvp2 = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
-            final SequencePointable sp1 = (SequencePointable) SequencePointable.FACTORY.createPointable();
-            final SequencePointable sp2 = (SequencePointable) SequencePointable.FACTORY.createPointable();
             return new IBinaryComparator() {
                 @Override
                 public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) {
                     tvp1.set(b1, s1, l1);
                     tvp2.set(b2, s2, l2);
-                    if (tvp1.getTag() != tvp2.getTag()) {
-                        return tvp1.getTag() - tvp2.getTag();
-                    }
-                    // Empty sequences do not match. Supports hash based join.
-                    switch (tvp1.getTag()) {
-                        case ValueTag.SEQUENCE_TAG:
-                            tvp1.getValue(sp1);
-                            if (sp1.getEntryCount() == 0) {
-                                return -1;
-                            }
-
-                            switch (tvp2.getTag()) {
-                                case ValueTag.SEQUENCE_TAG:
-                                    tvp2.getValue(sp2);
-                                    if (sp2.getEntryCount() == 0) {
-                                        return 1;
-                                    }
-                                    break;
-                                default:
-                            }
-
-                            break;
-                        default:
-                    }
-                    // Do a binary compare between byte arrays.
-                    for (int i = 0; i < b1.length && i < b2.length; i++) {
-                        if (b1[i] != b2[i]) {
-                            return b1[i] - b2[i];
-                        }
-                    }
-                    return b1.length - b2.length;
+                    return 0;
                 }
             };
         }