Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Drill >> mail # dev >> [09/10] git commit: Drill-278: fix for Join predicate with CHAR types hit run-time error


Copy link to this message
-
[09/10] git commit: Drill-278: fix for Join predicate with CHAR types hit run-time error
Drill-278: fix for Join predicate with CHAR types hit run-time error
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/c5916653
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/c5916653
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/c5916653

Branch: refs/heads/master
Commit: c591665343b7640d82397f5668f98b54c9e789a9
Parents: 8a571b3
Author: Jinfeng Ni <[EMAIL PROTECTED]>
Authored: Fri Nov 8 09:23:22 2013 -0800
Committer: Jacques Nadeau <[EMAIL PROTECTED]>
Committed: Fri Nov 8 09:23:22 2013 -0800

----------------------------------------------------------------------
 .../drill/exec/physical/impl/join/MergeJoinBatch.java       | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/c5916653/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java
index 1f5c707..1e20e91 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java
@@ -340,13 +340,8 @@ public class MergeJoinBatch extends AbstractRecordBatch<MergeJoinPOP> {
     }
 
     // check value equality
-    cg.getEvalBlock()._if(compareThisLeftExprHolder.getValue().eq(compareNextLeftExprHolder.getValue()))
-                     ._then()
-                       ._return(JExpr.lit(0));
-
-    // no match if reached
-    cg.getEvalBlock()._return(JExpr.lit(1));
-
+    FunctionCall g = new FunctionCall(ComparatorFunctions.COMPARE_TO, ImmutableList.of((LogicalExpression) new HoldingContainerExpression(compareThisLeftExprHolder), (LogicalExpression)  new HoldingContainerExpression(compareNextLeftExprHolder)), ExpressionPosition.UNKNOWN);
+    cg.addExpr(new ReturnValueExpression(g, false), false);
 
     // generate copyLeft()
     //////////////////////