mustafasrepo commented on issue #8572:
URL: 
https://github.com/apache/arrow-datafusion/issues/8572#issuecomment-1862321943

   By second I mean from bottom to top. In your original example
   ```sql
       "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",
   ```
   `RepartitionExec` immediately below the `SortExec` has input partition 8. 
   Other plan would be 
   ```sql
       "SortPreservingMergeExec: [a@0 ASC NULLS LAST]",
       "  RepartitionExec: partitioning=Hash([c@1], 8), input_partitions=8, 
preserve_order=true",
       "    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",
   ```
   In this case `streaming_merge` will be used in the internal of second 
`RepartitionExec`


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