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


##########
datafusion/physical-plan/Cargo.toml:
##########
@@ -36,7 +36,6 @@ workspace = true
 
 [features]
 force_hash_collisions = []
-bench = []

Review Comment:
   👍 



##########
datafusion/physical-plan/benches/sort_preserving_merge.rs:
##########
@@ -115,18 +115,13 @@ fn get_bench_data() -> Vec<BenchData> {
     let mut push_bench_data = |bench_name: &str, partitions: 
Vec<Vec<RecordBatch>>| {
         let schema = partitions[0][0].schema();
         // Define sort order (col1 ASC, col2 ASC, col3 ASC)
-        let sort_order = LexOrdering::new(
-            schema
-                .fields()
-                .iter()
-                .map(|field| {
-                    PhysicalSortExpr::new(
-                        col(field.name(), &schema).unwrap(),
-                        SortOptions::default(),
-                    )
-                })
-                .collect(),
-        );
+        let sort_order = LexOrdering::new(schema.fields().iter().map(|field| {

Review Comment:
   I verified that without this change the benchmark fails like:
   
   ```
   error[E0308]: mismatched types
      --> datafusion/physical-plan/benches/sort_preserving_merge.rs:134:13
       |
   134 |             sort_order,
       |             ^^^^^^^^^^ expected `LexOrdering`, found 
`Option<LexOrdering>`
       |
       = note: expected struct `LexOrdering`
                    found enum `Option<LexOrdering>`
   help: consider using `Option::expect` to unwrap the `Option<LexOrdering>` 
value, panicking if the value is an `Option::None`
       |
   134 |             sort_order: sort_order.expect("REASON"),
       |                       +++++++++++++++++++++++++++++
   ```



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