-
Notifications
You must be signed in to change notification settings - Fork 190
[FEATURE] Push down sort on RexCall of monotonic #3990
Copy link
Copy link
Closed
Labels
calcitecalcite migration releatedcalcite migration releatedenhancementNew feature or requestNew feature or requestpushdownpushdown related issuespushdown related issuesv3.3.0
Description
Is your feature request related to a problem?
This query
source = test | eval b = a + 1 | sort b
is equivalent to:
source = test | sort a | eval b = a + 1
since a + 1 is monotonic and so it's collation equals to a.
We can transform the query into the latter one and then has chance to push down its sort into scan.
What solution would you like?
A clear and concise description of what you want to happen.
What alternatives have you considered?
A clear and concise description of any alternative solutions or features you've considered.
Do you have any additional context?
The SortProjectTransposeRule in Calcite doesn't support transpose a sort on RexCall.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
calcitecalcite migration releatedcalcite migration releatedenhancementNew feature or requestNew feature or requestpushdownpushdown related issuespushdown related issuesv3.3.0
Type
Projects
Status
New
Status
Done