kosiew commented on code in PR #26852:
URL: https://github.com/apache/datafusion/pull/26852#discussion_r4599184965


##########
datafusion/physical-plan/src/coalesce_partitions.rs:
##########
@@ -84,9 +84,6 @@ impl CoalescePartitionsExec {
         // Coalescing partitions loses existing orderings:
         let mut eq_properties = input.equivalence_properties().clone();
         eq_properties.clear_orderings();

Review Comment:
   Optional follow-up: could we preserve ordering and explicit grouping on the 
single-partition fast path? `execute` forwards the child stream directly, 
optionally applying fetch truncation, so neither operation splits groups. 
Consider conditioning sequence-property invalidation on multiple partitions, 
with tests for single-partition passthrough/fetch and multi-partition clearing, 
while retaining unrelated property handling. The current behavior is safe but 
conservative.



##########
datafusion/physical-expr/src/equivalence/mod.rs:
##########
@@ -267,6 +267,50 @@ mod tests {
         Ok(())
     }
 
+    #[test]

Review Comment:
   Optional test improvement: could we also cover `clear_orderings()` when the 
ordering class is already empty but explicit grouping exists? Assert that the 
grouping class and normalized cache are cleared and `grouping_satisfy` returns 
false. This would guard against a future early return based on an empty 
ordering class; existing coalesce tests already cover the behavior indirectly.



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