ilooner commented on a change in pull request #1373: DRILL-6517: Hash-Join: If
not OK, exit early from prefetchFirstBatchFromBothSides
URL: https://github.com/apache/drill/pull/1373#discussion_r202423357
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java
##########
@@ -289,7 +283,13 @@ private IterOutcome sniffNonEmptyBatch(int inputIndex,
RecordBatch recordBatch)
if (recordBatch.getRecordCount() == 0) {
continue;
}
- // We got a non empty batch
+ // We got a non empty batch; update the memory manager
+ final boolean isBuildSide = inputIndex == 1;
+ final int side = isBuildSide ? RIGHT_INDEX : LEFT_INDEX;
Review comment:
isn't 0 / 1 and LEFT_INDEX / RIGHT_INDEX the same thing? Similarly isn't
**side** the same thing as **inputIndex**? Could we make things consistent to
avoid confusion? Or if there is a good reason for using different names for
things could you add a comment explaining the differences.
----------------------------------------------------------------
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