Skip to content

Commit

Permalink
Fix partition output flush
Browse files Browse the repository at this point in the history
The output size was incorrectly estimated in certain cases due to a bug.
This was causing flush to happen either too early or too late
depending on a query shape.
  • Loading branch information
arhimondr committed Mar 30, 2024
1 parent d3503ce commit d10cc45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion velox/exec/PartitionedOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ BlockingReason Destination::advance(
// Collect rows to serialize.
bool shouldFlush = false;
while (rowIdx_ < rows_.size() && !shouldFlush) {
bytesInCurrent_ += sizes[rowIdx_];
bytesInCurrent_ += sizes[rows_[rowIdx_]];
++rowIdx_;
++rowsInCurrent_;
shouldFlush =
Expand Down

0 comments on commit d10cc45

Please sign in to comment.