Push sort requirements through simple projections#27
Merged
askalt merged 1 commit intoJul 6, 2026
Conversation
0b56a23 to
dbfab25
Compare
Author
|
Approved in upstream: apache#23288 |
askalt
approved these changes
Jul 5, 2026
|
Let's fix |
Author
|
Tests are broken far before this patch. I suggest combine test fix with bumping to actual release instead |
In the branch https://github.com/tarantool/datafusion/tree/release-52.3.0 tests are green. What is the reason on the non-stability? I mean, |
I am OK to bump DF, we could switch to a newer one just after TCS 1.3.0 is tagged. |
Allow EnforceSorting sort pushdown to remap ordering requirements through ProjectionExec when the required output columns are simple aliases or reordered input columns. Prior this patch sort pushdown stopped at `ProjectionExec`, even when the projection only changed column order. This could force a `SortExec` above the projection and therefore above larger subplans such as `UnionExec`, preventing branch-local sorts from being used. The new logic conservatively handles only column-to-column projections and leaves computed expressions untouched, preserving correctness while enabling better plans for reordered projection cases.
dbfab25 to
8309c8f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow EnforceSorting sort pushdown to remap ordering requirements through ProjectionExec when the required output columns are simple aliases or reordered input columns.
Prior this patch sort pushdown stopped at
ProjectionExec, even when the projection only changed column order. This could force aSortExecabove the projection and therefore above larger subplans such asUnionExec, preventing branch-local sorts from being used.The new logic conservatively handles only column-to-column projections and leaves computed expressions untouched, preserving correctness while enabling better plans for reordered projection cases.