Rachelint commented on code in PR #11802:
URL: https://github.com/apache/datafusion/pull/11802#discussion_r1705106562


##########
datafusion/core/src/datasource/listing/helpers.rs:
##########
@@ -139,8 +140,8 @@ pub fn split_files(
     // effectively this is div with rounding up instead of truncating
     let chunk_size = (partitioned_files.len() + n - 1) / n;
     partitioned_files
-        .chunks(chunk_size)
-        .map(|c| c.to_vec())
+        .chunks_mut(chunk_size)
+        .map(|c| c.iter_mut().map(mem::take).collect())
         .collect()
 }

Review Comment:
   I use this to replace the `chunk_mut`, see no changes in performance, but it 
is really good to eliminiate the `default` need of `PartitionedFile` .



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