2010YOUY01 commented on code in PR #27394:
URL: https://github.com/apache/datafusion/pull/27394#discussion_r4570245620


##########
datafusion/physical-plan/src/sorts/sort.rs:
##########
@@ -1383,6 +1383,12 @@ pub struct SortExec {
     metrics_set: ExecutionPlanMetricsSet,
     /// Preserve partitions of input plan. If false, the input partitions
     /// will be sorted and merged into a single output partition.
+    ///
+    /// This is an optimizer flag used for the
+    /// [`ExecutionPlan::required_input_distribution`] decision for this node. 
The optimizer
+    /// will optionally insert an extra `CoalescePartitionsExec` below it 
later.
+    /// This flag will not influence the semantics, execution logic, or plan 
property

Review Comment:
   Thanks for the review, updated to try to explain it better.
   
   The point is it doesn't influence the plan property directly
   - directly: `with_preserve_partitions()` should recompute the plan properties
   - indirectly: optimizer use it to replace child plan, at that point plan 
properties should get recomputed
   
   Doing direct propagation should be a hack, and the mechanism is 
unexplainable, which was what the original PR trying to do.



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