Assert that JoinNode hash symbols are for equijoins
Add an assertion to JoinNode construct that hash symbols are present
only if equijoin clauses are also present.  Otherwise, there's no key
set to be hashing.  The NestLoopJoinOperator doesn't look at the hash
symbol.
@@ -95,6 +95,9 @@ public class JoinNode
.build();
checkArgument(inputSymbols.containsAll(outputSymbols), "Left and right join inputs do not contain all output symbols");
checkArgument(!isCrossJoin() || inputSymbols.equals(outputSymbols), "Cross join does not support output symbols pruning or reordering");
+
+ checkArgument(!(criteria.isEmpty() && leftHashSymbol.isPresent()), "Left hash symbol is only valid in an equijoin");
+ checkArgument(!(criteria.isEmpty() && rightHashSymbol.isPresent()), "Right hash symbol is only valid in an equijoin");
}
public enum DistributionType
