rubenada commented on a change in pull request #1279: [CALCITE-3128] Joining
two tables producing only NULLs will return 0 …
URL: https://github.com/apache/calcite/pull/1279#discussion_r298035024
##########
File path:
core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableHashJoin.java
##########
@@ -229,7 +229,10 @@ private Result implementHashJoin(EnumerableRelImplementor
implementor, Prefer pr
Expressions.constant(joinType.generatesNullsOnLeft()))
.append(
Expressions.constant(
- joinType.generatesNullsOnRight())))).toBlock());
+ joinType.generatesNullsOnRight()))
Review comment:
I was expecting `BuiltInMethod.java` to be modified in this patch, in order
to add the new boolean parameter (isConditionAlwaysTrue) to the `HASH_JOIN`
declaration. To my surprise, there was already a mismatch, because right now
BuiltInMethod.HASH_JOIN is defined with parameters Enumerable, Function1,
Function1, Function2:
`HASH_JOIN(ExtendedEnumerable.class, "hashJoin", Enumerable.class,
Function1.class, Function1.class, Function2.class),`
but here in EnumerableHashJoin we are creating a hashJoin call expression
with parameters Enumerable, Function1, Function1, Function2,
**EqualityComparer, boolean, boolean** (and now yet another boolean with the
current patch).
In the end it seems to work fine anyway, I guess because ExtendedEnumerable
defines several overloaded hashJoin methods, but IMHO we should update
BuiltInMethod.HASH_JOIN to reflect on its parameter list the actual types that
are used when generating the hashJoin expression in EnumerableHashJoin, i.e.:
`HASH_JOIN(ExtendedEnumerable.class, "hashJoin", Enumerable.class,
Function1.class, Function1.class, Function2.class, EqualityComparer.class,
boolean.class, boolean.class, boolean.class),`
----------------------------------------------------------------
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