rubenada commented on a change in pull request #1156: [CALCITE-2973] Allow
theta joins that have equi conditions to be exec…
URL: https://github.com/apache/calcite/pull/1156#discussion_r317477415
##########
File path:
linq4j/src/main/java/org/apache/calcite/linq4j/EnumerableDefaults.java
##########
@@ -1150,6 +1186,119 @@ public void close() {
};
}
+ /** Implementation of join that builds the right input and probes with the
+ * left */
+ private static <TSource, TInner, TKey, TResult> Enumerable<TResult>
hashJoinWithPredicate_(
+ final Enumerable<TSource> outer, final Enumerable<TInner> inner,
+ final Function1<TSource, TKey> outerKeySelector,
+ final Function1<TInner, TKey> innerKeySelector,
+ final Function2<TSource, TInner, TResult> resultSelector,
+ final EqualityComparer<TKey> comparer, final boolean generateNullsOnLeft,
+ final boolean generateNullsOnRight, final Predicate2<TSource, TInner>
predicate) {
+
Review comment:
I think the first line of this method could be:
`if (predicate == null) return hashEquiJoin_(...);`
That should help performance in that case, and would also help simplify the
code of the `hashJoinWithPredicate_` method (no need to check `predicate ==
null` / `predicate != null` )
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services