dwsmith1983 commented on code in PR #5568:
URL: https://github.com/apache/datafusion-comet/pull/5568#discussion_r3900498514
##########
native/shuffle/src/partitioners/partitioned_batch_iterator.rs:
##########
@@ -42,14 +42,22 @@ impl PartitionedBatchesProducer {
}
}
+ /// References to all buffered batches. Build this once per write cycle
and share it
+ /// across every partition's [`Self::produce`] call instead of rebuilding
a fresh
+ /// `Vec<&RecordBatch>` over all buffered batches for each partition.
+ pub(super) fn batch_refs(&self) -> Vec<&RecordBatch> {
+ self.buffered_batches.iter().collect()
+ }
+
pub(super) fn produce<'a>(
- &'a mut self,
+ &'a self,
+ refs: &'a [&'a RecordBatch],
Review Comment:
Added, with a debug-build test pinning that a truncated refs slice panics.
--
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]