rluvaton commented on code in PR #23614:
URL: https://github.com/apache/datafusion/pull/23614#discussion_r3588883694
##########
datafusion/core/benches/sort.rs:
##########
@@ -813,9 +813,38 @@ where
.collect()
}
-type AxisGenerator = Box<dyn Fn(DataProfile, Cardinality, usize) ->
PartitionedBatches>;
+fn create_single_partition<T, F>(input: Vec<T>, f: F) -> Vec<RecordBatch>
+where
+ T: Clone,
+ F: Fn(Vec<T>) -> RecordBatch,
+{
+ input.chunks(BATCH_SIZE).map(|x| f(x.to_vec())).collect()
Review Comment:
Done, thanks
I would still prefer if no vector creation again was needed but at the
current way we setup the benchmark this is inevitable
--
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]