andygrove commented on code in PR #1452:
URL: https://github.com/apache/datafusion-comet/pull/1452#discussion_r1975564762
##########
native/core/src/execution/shuffle/shuffle_writer.rs:
##########
@@ -829,54 +781,53 @@ impl PartitionBuffer {
});
self.num_active_rows += end - start;
repart_timer.stop();
+ start = end;
if self.num_active_rows >= self.batch_size {
- let flush = self.flush(metrics);
- if let Err(e) = flush {
- return AppendRowStatus::MemDiff(Err(e));
- }
- mem_diff += flush.unwrap();
-
- let init = self.init_active_if_necessary(metrics);
- if init.is_err() {
- return AppendRowStatus::StartIndex(end);
- }
- mem_diff += init.unwrap();
+ self.flush(metrics)?;
}
- start = end;
}
- AppendRowStatus::MemDiff(Ok(mem_diff))
Review Comment:
No need to return memory size here because all accounting already took place
in the calls to `allocate_active_builders` and `flush` in this method
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]