somandal opened a new pull request, #10408:
URL: https://github.com/apache/pinot/pull/10408
This PR adds support for ordering on the collation keys when a
LogicalSortExchange is present in the RelNode. To do this the following changes
have been made:
- Add a `PinotLogicalSortExchange` to replace usage of
`LogicalSortExchange`. This is needed because later `LogicalSortExchange` is
broken into a `MailboxSendNode` and `MailboxReceiveNode`. Information on where
to perform ordering (sender, receiver or both) needs to be passed down to these
nodes.
- Add support for ordering based on collation keys in the
`MailboxReceiveOperator` when `PinotLogicalSortExchange` is used.
- `MailboxSendOperator` will be modified later to add sort support. Once
the sender can sort, the receiver needs to be modified to do a k-way merge
instead of `PriorityQueue` based sort if the input is sorted.
- Modify `SortOperator` to avoid sorting if the input is already sorted. It
should still apply offset + limit
We will also integrate with `SqlHint` support to decide where to sort
(sender, receiver, or both) once the path forward has been figured out on how
to get hint support for some of the Apache Calcite nodes such as Window, Sort,
Filter, etc.
This PR is a pre-requisite to adding support for Window Functions with
`ORDER BY`.
Design document:
https://docs.google.com/document/d/13CmFm4djI09JKF_Xty5acoXxJoxC9CLXAsmikgzgtIs/edit?usp=sharing
(discusses the design on how to sort and discusses sorting via
`LogicalSortExchange`)
Window functions Issue: https://github.com/apache/pinot/issues/7213
Window Function Planner PR: https://github.com/apache/pinot/pull/10228
Window Functions Runtime PR for empty OVER() and OVER(PARTITION BY):
https://github.com/apache/pinot/pull/10286
cc @walterddr @siddharthteotia @vvivekiyer @ankitsultana
--
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]