tustvold opened a new issue, #8572:
URL: https://github.com/apache/arrow-datafusion/issues/8572

   ### Is your feature request related to a problem or challenge?
   
   Whilst working on #8540 I was surprised to see removing unbounded causing 
the DataFusion optimizer to not remove the `SortExec` from the below plan:
   
   ```
       "SortPreservingMergeExec: [a@0 ASC NULLS LAST]",
       "  SortExec: expr=[a@0 ASC NULLS LAST]",
       "    RepartitionExec: partitioning=Hash([c@1], 8), input_partitions=8",
       "      RepartitionExec: partitioning=RoundRobinBatch(8), 
input_partitions=1",
       "        CsvExec: file_groups={1 group: [[file_path]]}, projection=[a, 
c, d], output_ordering=[a@0 ASC NULLS LAST], has_header=true",
   ``` 
   
   Doing some spelunking this appears to be a regression introduced by 
https://github.com/apache/arrow-datafusion/pull/7671#discussion_r1341636365
   
   ### Describe the solution you'd like
   
   I can't see an obvious reason to not enable this by default, as it seems 
like the more reasonable default, and also consistent with how I historically 
remember DataFusion behaving
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   FYI @alamb @ozankabak 


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