Ben-Zvi commented on a change in pull request #1606: Drill 6845: Semi-Hash-Join
to skip incoming build duplicates, automatically stop skipping if too few
URL: https://github.com/apache/drill/pull/1606#discussion_r247747842
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java
##########
@@ -973,9 +973,32 @@ public IterOutcome executeBuildPhase() throws
SchemaChangeException {
// Do auto tuning
buildCalc = partitionNumTuning(maxBatchRowCount, buildCalc);
}
- // to be used in case of a Semi Join skippinging duplicates
- spillControlCalc = new HashJoinSpillControlImpl(allocator,
RECORDS_PER_BATCH,
- (int)
context.getOptions().getOption(ExecConstants.HASHJOIN_MIN_BATCHES_IN_AVAILABLE_MEMORY_VALIDATOR),
batchMemoryManager);
+ if ( semiSkipDuplicates ) {
+ // in case of a Semi Join skippinging duplicates, use a "spill
control" calc
+ // (may revert back to the buildCalc if the code decides to stop
skipping)
+ currentCalc = new HashJoinSpillControlImpl(allocator,
RECORDS_PER_BATCH,
+ (int)
context.getOptions().getOption(ExecConstants.HASHJOIN_MIN_BATCHES_IN_AVAILABLE_MEMORY_VALIDATOR),
Review comment:
The idea was to leave a small "slack" in memory to cover cases like
inaccurate estimates (e.g., probe side), or varchar buffer doubling, and that
"incoming" batch read from the spill file, etc.
----------------------------------------------------------------
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