You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Redesign the try_reverse_output to support more cases #19403
Hi @zhuqi-lucas , I have opened a PR to address this issue.
I implemented the logic in PushdownSort to utilize EquivalenceProperties. The optimizer now detects if a column in the sort prefix is constant and strips it from the required_ordering before attempting the pushdown.
I've also added a unit test using a mock plan to verify that the SortExec is correctly removed when the prefix is constant.
Hi @Nithurshen , sorry i already had a PR, and i will redesign the logic here, and it's not limited to prefix removal, but also monotonic, etc. Also i will update my slt cases.
changed the title [-]Support sort prefix removal when it's logical_constants.[/-][+]Redesign the try_reverse_output to support more cases[/+]on Dec 22, 2025
Activity
Nithurshen commentedon Dec 22, 2025
Hi @zhuqi-lucas , I have opened a PR to address this issue.
I implemented the logic in
PushdownSortto utilizeEquivalenceProperties. The optimizer now detects if a column in the sort prefix is constant and strips it from therequired_orderingbefore attempting the pushdown.I've also added a unit test using a mock plan to verify that the
SortExecis correctly removed when the prefix is constant.Kindly let me know what you think.
zhuqi-lucas commentedon Dec 22, 2025
Hi @Nithurshen , sorry i already had a PR, and i will redesign the logic here, and it's not limited to prefix removal, but also monotonic, etc. Also i will update my slt cases.
Nithurshen commentedon Dec 22, 2025
@zhuqi-lucas, No problem.
I will close mine.
[-]Support sort prefix removal when it's logical_constants.[/-][+]Redesign the try_reverse_output to support more cases[/+]Redesign the try_reverse_output to support more cases (#19446)