martin-g commented on code in PR #3861:
URL: https://github.com/apache/datafusion-comet/pull/3861#discussion_r3020628418


##########
native/shuffle/src/partitioners/multi_partition.rs:
##########
@@ -582,7 +582,9 @@ impl ShufflePartitioner for 
MultiPartitionShuffleRepartitioner {
                 // if we wrote a spill file for this partition then copy the
                 // contents into the shuffle file
                 if let Some(spill_path) = self.partition_writers[i].path() {
-                    let mut spill_file = 
BufReader::new(File::open(spill_path)?);
+                    // Use raw File handle (not BufReader) so that 
std::io::copy
+                    // can use copy_file_range/sendfile for zero-copy on Linux.
+                    let mut spill_file = File::open(spill_path)?;

Review Comment:
   Actually it falls back in this case and wraps in buffers itself - 
https://doc.rust-lang.org/stable/src/std/io/copy.rs.html#77



-- 
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]

Reply via email to