tustvold commented on a change in pull request #1748:
URL: https://github.com/apache/arrow-datafusion/pull/1748#discussion_r799639772



##########
File path: datafusion/src/physical_plan/sorts/sort_preserving_merge.rs
##########
@@ -128,6 +128,12 @@ impl ExecutionPlan for SortPreservingMergeExec {
         Distribution::UnspecifiedDistribution
     }
 
+    fn should_repartition_children(&self) -> bool {
+        // if the children are repartitioned they may no longer remain
+        // sorted
+        false

Review comment:
       I made this comment elsewhere, but going to make it here for visibility 
- this will only prevent repartitioning of direct children. 
   
   So for example if you had
   
   ```
   Sort Preserving Merge <- Projection Exec <- Sorted Scan
   ```
   
   I think Repartition could convert this to
   
   ```
   Sort Preserving Merge <- Projection Exec <- Repartition <- Sorted Scan
   ```
   




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


Reply via email to