diff options
author | Jason Altekruse <altekrusejason@gmail.com> | 2016-02-10 17:36:47 -0800 |
---|---|---|
committer | Jason Altekruse <altekrusejason@gmail.com> | 2016-04-20 08:10:40 -0700 |
commit | d24205d4e795a1aab54b64708dde1e7deeca668b (patch) | |
tree | a20ba3e0c3bfb5f77cba770ca53af95aaced7cd5 /exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java | |
parent | c6a03eb1708f3cea6cea2f9530057ad707c374c0 (diff) |
DRILL-4445: Standardize the Physical and Logical plan nodes to use Lists instead of arrays for their inputs
Remove some extra translation logic used to move between the
two representations.
TODO - look back the the Join logical node, has two JsonCreator annotations,
but only one will be used. Not sure if the behavior of which is chosen
is considered documented behavior, should just fix it on our end.
Diffstat (limited to 'exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java')
-rw-r--r-- | exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java index 3ea97c658..2ba54ddc0 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java @@ -18,6 +18,7 @@ package org.apache.drill.exec.physical.impl.join; import java.io.IOException; +import java.util.ArrayList; import java.util.List; import org.apache.drill.common.expression.FieldReference; @@ -281,14 +282,14 @@ public class HashJoinBatch extends AbstractRecordBatch<HashJoinPOP> { public void setupHashTable() throws IOException, SchemaChangeException, ClassTransformationException { // Setup the hash table configuration object int conditionsSize = conditions.size(); - final NamedExpression rightExpr[] = new NamedExpression[conditionsSize]; - NamedExpression leftExpr[] = new NamedExpression[conditionsSize]; + final List<NamedExpression> rightExpr = new ArrayList<>(conditionsSize); + List<NamedExpression> leftExpr = new ArrayList<>(conditionsSize); JoinComparator comparator = JoinComparator.NONE; // Create named expressions from the conditions for (int i = 0; i < conditionsSize; i++) { - rightExpr[i] = new NamedExpression(conditions.get(i).getRight(), new FieldReference("build_side_" + i)); - leftExpr[i] = new NamedExpression(conditions.get(i).getLeft(), new FieldReference("probe_side_" + i)); + rightExpr.add(new NamedExpression(conditions.get(i).getRight(), new FieldReference("build_side_" + i))); + leftExpr.add(new NamedExpression(conditions.get(i).getLeft(), new FieldReference("probe_side_" + i))); // Hash join only supports certain types of comparisons comparator = JoinUtils.checkAndSetComparison(conditions.get(i), comparator); |