>From Vijay Sarathy <[email protected]>:

Vijay Sarathy has uploaded this change for review. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17411 )


Change subject: [ASTERIXDB-3128][COMP] Hashjoin hint with build generates 
warning
......................................................................

[ASTERIXDB-3128][COMP] Hashjoin hint with build generates warning

Change-Id: Ia26a912063aaf063a530acc7ff1a7a006f0ad0c9
---
M 
hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/util/JoinUtils.java
1 file changed, 15 insertions(+), 3 deletions(-)



  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/11/17411/1

diff --git 
a/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/util/JoinUtils.java
 
b/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/util/JoinUtils.java
index fa0549f..84a6784 100644
--- 
a/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/util/JoinUtils.java
+++ 
b/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/util/JoinUtils.java
@@ -40,6 +40,7 @@
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import 
org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractBinaryJoinOperator;
 import 
org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.LogicalPropertiesVisitor;
+import 
org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.VariableUtilities;
 import 
org.apache.hyracks.algebricks.core.algebra.operators.physical.AbstractJoinPOperator.JoinPartitioningType;
 import 
org.apache.hyracks.algebricks.core.algebra.operators.physical.HybridHashJoinPOperator;
 import 
org.apache.hyracks.algebricks.core.algebra.operators.physical.InMemoryHashJoinPOperator;
@@ -57,14 +58,16 @@
     }

     public static void 
setJoinAlgorithmAndExchangeAlgo(AbstractBinaryJoinOperator op, boolean 
topLevelOp,
-            IOptimizationContext context) {
+            IOptimizationContext context) throws AlgebricksException {
         if (!topLevelOp) {
             throw new IllegalStateException("Micro operator not implemented 
for: " + op.getOperatorTag());
         }
         List<LogicalVariable> sideLeft = new LinkedList<>();
         List<LogicalVariable> sideRight = new LinkedList<>();
-        List<LogicalVariable> varsLeft = 
op.getInputs().get(0).getValue().getSchema();
-        List<LogicalVariable> varsRight = 
op.getInputs().get(1).getValue().getSchema();
+        List<LogicalVariable> varsLeft = new LinkedList<>();
+        List<LogicalVariable> varsRight = new LinkedList<>();
+        
VariableUtilities.getUsedVariablesInDescendantsAndSelf(op.getInputs().get(0).getValue(),
 varsLeft);
+        
VariableUtilities.getUsedVariablesInDescendantsAndSelf(op.getInputs().get(1).getValue(),
 varsRight);
         ILogicalExpression conditionExpr = op.getCondition().getValue();
         if (isHashJoinCondition(conditionExpr, varsLeft, varsRight, sideLeft, 
sideRight)) {
             BroadcastSide broadcastSide = getBroadcastJoinSide(conditionExpr, 
varsLeft, varsRight, context);

--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17411
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Ia26a912063aaf063a530acc7ff1a7a006f0ad0c9
Gerrit-Change-Number: 17411
Gerrit-PatchSet: 1
Gerrit-Owner: Vijay Sarathy <[email protected]>
Gerrit-MessageType: newchange

Reply via email to