alamb commented on code in PR #15913:
URL: https://github.com/apache/datafusion/pull/15913#discussion_r2072106466


##########
datafusion/physical-plan/benches/sort_preserving.rs:
##########
@@ -0,0 +1,138 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use arrow::{
+    array::{ArrayRef, StringArray},
+    record_batch::RecordBatch,
+};
+use arrow_schema::SortOptions;
+use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
+use datafusion_execution::TaskContext;
+use datafusion_physical_expr::{expressions::col, LexOrdering, 
PhysicalSortExpr};
+use datafusion_physical_plan::test::TestMemoryExec;
+use datafusion_physical_plan::{
+    collect, sorts::sort_preserving_merge::SortPreservingMergeExec,
+};
+
+use std::sync::Arc;
+
+const BENCH_ROWS: usize = 1_000_000; // 1 million rows
+
+fn get_random_large_string(idx: usize) -> String {

Review Comment:
   technically this isn't really a random string, it is a round robin choice 
between 5 distinct values, maybe calling this something different would be 
clearer:
   
   ```suggestion
   fn get_large_string(idx: usize) -> String { 
   ```



##########
datafusion/physical-plan/Cargo.toml:
##########
@@ -86,3 +87,8 @@ name = "partial_ordering"
 [[bench]]
 harness = false
 name = "spill_io"
+
+[[bench]]
+harness = false
+name = "sort_preserving"

Review Comment:
   shall we just call it `merge`?



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to