amansinha100 commented on a change in pull request #1598: DRILL-6880: For
Hash-Join hash-table build - treat null keys as an equal match
URL: https://github.com/apache/drill/pull/1598#discussion_r245810916
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/HashTableTemplate.java
##########
@@ -224,6 +224,13 @@ private boolean isKeyMatch(int incomingRowIdx,
if (isProbe) {
match = isKeyMatchInternalProbe(incomingRowIdx, currentIdxWithinBatch);
} else {
+ // in case (of a hash-join only) where both the new incoming key and
the current are null, treat them as
+ // a match; i.e. the new would be added into the helper (but not the
Hash-Table !), though it would never
+ // be used (not putting it into the helper would take a bigger code
change, and some performance cost, hence
+ // not worth it). In the past such a new null key was added into the
Hash-Table (i.e., no match), which
+ // created long costly chains - SEE DRILL-6880)
+ if ( areBothKeysNull(incomingRowIdx, currentIdxWithinBatch) ) { return
true; }
Review comment:
Agree that the function name does not reflect the fact that the index gets
incremented. Either we change the function name to
`isKeyMatchAndUpdateIndex()` or do that adjustment outside this function.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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