Problem
PinotLogicalSortExchange currently sorts only on the receiver. Operators such as WINDOW and MATCH_RECOGNIZE therefore require the receiver to buffer and sort the complete exchanged input instead of merging already sorted sender streams.
Proposed scope
- Add sender-side sorting using the exchange collation, including direction and null ordering.
- Merge sorted mailbox streams incrementally on the receiver with bounded memory.
- Preserve cancellation, deadline, backpressure, and error propagation behavior.
- Add distributed tests covering multiple senders, duplicate keys, nulls, and empty streams.
Context
Follow-up to #19311 and the existing receiver-side-only note in PinotWindowExchangeNodeInsertRule.
Problem
PinotLogicalSortExchangecurrently sorts only on the receiver. Operators such as WINDOW and MATCH_RECOGNIZE therefore require the receiver to buffer and sort the complete exchanged input instead of merging already sorted sender streams.Proposed scope
Context
Follow-up to #19311 and the existing receiver-side-only note in
PinotWindowExchangeNodeInsertRule.