Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Add a sub-class of the Sort operator that takes advantage of the fact that its input is sorted on a prefix of the key.
For example, given the relation "select * from t order by x" it is easier to compute "select * from t order by x, y". The Sort operator can spot when the value of "x" changes, flush all of its input, and start sorting on values of "y" until the value of "x" changes again.
I don't know whether to call this "weak" sort or "partial sort". It's "streaming" in the sense that it can produce output before it sees all of the input (and therefore requires less memory); it is not just applicable to streaming SQL.
Attachments
Issue Links
- is related to
-
CALCITE-5940 Add the Rule to merge Limit
- Closed
- relates to
-
CALCITE-853 EnumerableAggregate should take advantage of input collation
- Resolved