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

   I've tried
   
   - this:
     ```rust
       fn required_input_distribution(&self) -> Vec<Distribution> {
           vec![Distribution::UnspecifiedDistribution]
       }
   
       fn benefits_from_input_partitioning(&self) -> Vec<bool> {
           vec![true]
       }
     ```
   
   - and this:
     ```rust
       fn required_input_distribution(&self) -> Vec<Distribution> {
           if self.preserve_partitioning {
               vec![Distribution::UnspecifiedDistribution]
           } else {
               // global sort
               // TODO support RangePartition and OrderedDistribution
               let physical_exprs =
                   self.expr().iter().map(|e| Arc::clone(&e.expr)).collect();
               vec![Distribution::HashPartitioned(physical_exprs)]
           }
       }
   
       fn benefits_from_input_partitioning(&self) -> Vec<bool> {
           vec![!self.preserve_partitioning]
       }
     ```
   
   But both of these make the results have weird orders, not sure if I missed 
something


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to