Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/1181#discussion_r178445262
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java
---
@@ -153,16 +182,22 @@ public void update(int inputIndex) {
// calculate memory used so far based on previous outgoing row width
and how many rows we already processed.
final long memoryUsed = status.getOutPosition() *
getOutgoingRowWidth();
// This is the remaining memory.
- final long remainingMemory =
Math.max(outputBatchSize/WORST_CASE_FRAGMENTATION_FACTOR - memoryUsed, 0);
+ final long remainingMemory = Math.max(outputBatchSize - memoryUsed,
0);
// These are number of rows we can fit in remaining memory based on
new outgoing row width.
final int numOutputRowsRemaining =
RecordBatchSizer.safeDivide(remainingMemory, newOutgoingRowWidth);
- status.setTargetOutputRowCount(status.getOutPosition() +
numOutputRowsRemaining);
+
status.setTargetOutputRowCount(adjustOutputRowCount(status.getOutPosition() +
numOutputRowsRemaining));
setOutgoingRowWidth(newOutgoingRowWidth);
+
+ logger.debug("outputBatchSize : {}, avgOutgoingRowWidth : {},
outputRowCount : {}",
--- End diff --
Since this is a label, not a symbol, maybe "output batch size: {}"
---