alan910127 commented on issue #15088:
URL: https://github.com/apache/datafusion/issues/15088#issuecomment-2713326255

   Hi @2010YOUY01, 
   
   I've taken a look into this and found that the issue seems to be more 
related to `SortExec` itself rather than the physical optimizer. Specifically:
   
   - `SortExec::benefits_from_input_partitioning` returns `vec![false]`, 
causing `roundrobin_beneficial` to be `false`, which prevents the addition of a 
round-robin repartition plan.
   - `SortExec::required_input_distribution` returns 
`vec![Distribution::SinglePartition]` when `preserve_partitioning` is not set, 
meaning `ensure_distribution` also does not attempt to add round-robin 
repartitioning.
   
   Would it make sense to adjust these two functions? Are there any cases that 
rely on the current settings? I'd love to hear your thoughts!


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