mustafasrepo commented on PR #8107:
URL:
https://github.com/apache/arrow-datafusion/pull/8107#issuecomment-1805190678
By the way, I want to stress that this PR is beneficial even if it doesn't
solve the issue in #8043. This PR enables us to run some of the aggregate
queries in ordered or partially ordered mode. As can be seen from the test
result
```
GlobalLimitExec: skip=0, fetch=5
--SortPreservingMergeExec: [time_chunks@0 DESC], fetch=5
----ProjectionExec: expr=[date_bin(Utf8("15
minutes"),csv_with_timestamps.ts)@0 as time_chunks]
------AggregateExec: mode=FinalPartitioned, gby=[date_bin(Utf8("15
minutes"),csv_with_timestamps.ts)@0 as date_bin(Utf8("15
minutes"),csv_with_timestamps.ts)], aggr=[], ordering_mode=Sorted
--------CoalesceBatchesExec: target_batch_size=2
----------SortPreservingRepartitionExec:
partitioning=Hash([date_bin(Utf8("15 minutes"),csv_with_timestamps.ts)@0], 8),
input_partitions=8, sort_exprs=date_bin(Utf8("15
minutes"),csv_with_timestamps.ts)@0 DESC
------------AggregateExec: mode=Partial, gby=[date_bin(900000000000, ts@0)
as date_bin(Utf8("15 minutes"),csv_with_timestamps.ts)], aggr=[],
ordering_mode=Sorted
--------------RepartitionExec: partitioning=RoundRobinBatch(8),
input_partitions=1
----------------CsvExec: file_groups={1 group:
[[WORKSPACE_ROOT/datafusion/core/tests/data/timestamps.csv]]}, projection=[ts],
infinite_source=true, output_ordering=[ts@0 DESC], has_header=false
```
`AggregateExec`s work in `Sorted` mode, we can now determine that given `ts`
is ordered. `date_bin(900000000000, ts@0)` is also ordered. Previously these
`AggregateExec`s were not working in `Sorted` mode.
--
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]