gstamatakis95 commented on code in PR #25279:
URL: https://github.com/apache/datafusion/pull/25279#discussion_r4076250695


##########
datafusion/catalog-listing/src/table.rs:
##########
@@ -683,8 +683,26 @@ impl ListingTable {
             None => {} // no ordering required
         }
 
+        // Hive grouped files are contiguous key intervals, so they declare 
`Range`
+        // unless the statistics re-cut above changed the groups. The ordering 
must
+        // match the `SortOptions::default()` used to cut the groups.
+        let derived_output_partitioning =
+            if partitioned_by_file_group && !regrouped_by_statistics {
+                let ordering = table_partition_cols
+                    .iter()
+                    .map(|field| {
+                        
Expr::Column(Column::from_name(field.name())).sort(true, true)

Review Comment:
   The ordering now comes from `PhysicalSortExpr::new_default`, which is 
`SortOptions::default()`, the same default used to cut the groups.
   



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