sohami commented on a change in pull request #1650: DRILL-6707: Allow
Merge-Join batch resizing to go smaller than current outgoing row count
URL: https://github.com/apache/drill/pull/1650#discussion_r264464102
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordBatchMemoryManager.java
##########
@@ -209,8 +214,13 @@ public void setOutputRowCount(int targetBatchSize, int
rowWidth) {
public void setOutputRowCount(int outputRowCount) {
this.outputRowCount = outputRowCount;
+ if ( outputRowCount > MIN_NUM_ROWS &&
Integer.highestOneBit(outputRowCount) == outputRowCount ) {
+ this.outputRowCount--;
Review comment:
I don't think this is required since this function is called only after
calling overloaded function at line 211. Instead would be good to just have a
`Preconditions.checkArgument (outputRowCount <= MAX_NUM_ROWS)`
----------------------------------------------------------------
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