refactor(parser): Extract GROUP BY sort utilities to ParserUtils (#1051)#1051
Open
peterenescu wants to merge 1 commit intofacebookincubator:mainfrom
Open
refactor(parser): Extract GROUP BY sort utilities to ParserUtils (#1051)#1051peterenescu wants to merge 1 commit intofacebookincubator:mainfrom
peterenescu wants to merge 1 commit intofacebookincubator:mainfrom
Conversation
|
@peterenescu has exported this pull request. If you are a Meta employee, you can view the originating Diff in D96411887. |
peterenescu
added a commit
to peterenescu/verax
that referenced
this pull request
Mar 13, 2026
…ebookincubator#1051) Summary: Extracts GROUP BY sort handling utilities into reusable functions in ParserUtils.cpp/h: - `widenProjectionsForSort()`: Matches sort key expressions against projections by pointer identity, widens projection list if needed to include referenced column names not in SELECT list - `sortAndTrimProjections()`: Applies sort and trims extra columns Refactored `GroupByPlanner::resolveSortOrdinals()` and `addSort()` to use these utilities, reducing code duplication and improving maintainability. Differential Revision: D96411887
peterenescu
added a commit
to peterenescu/verax
that referenced
this pull request
Mar 13, 2026
…ebookincubator#1051) Summary: Extracts GROUP BY sort handling utilities into reusable functions in ParserUtils.cpp/h: - `widenProjectionsForSort()`: Matches sort key expressions against projections by pointer identity, widens projection list if needed to include referenced column names not in SELECT list - `sortAndTrimProjections()`: Applies sort and trims extra columns Refactored `GroupByPlanner::resolveSortOrdinals()` and `addSort()` to use these utilities, reducing code duplication and improving maintainability. Differential Revision: D96411887
be70d21 to
b72de37
Compare
…ebookincubator#1051) Summary: Extracts GROUP BY sort handling utilities into reusable functions in ParserUtils.cpp/h: - `widenProjectionsForSort()`: Matches sort key expressions against projections by pointer identity, widens projection list if needed to include referenced column names not in SELECT list - `sortAndTrimProjections()`: Applies sort and trims extra columns Refactored `GroupByPlanner::resolveSortOrdinals()` and `addSort()` to use these utilities, reducing code duplication and improving maintainability. Differential Revision: D96411887
b72de37 to
7e3598e
Compare
peterenescu
added a commit
to peterenescu/verax
that referenced
this pull request
Mar 13, 2026
…ebookincubator#1051) Summary: Extracts GROUP BY sort handling utilities into reusable functions in ParserUtils.cpp/h: - `widenProjectionsForSort()`: Matches sort key expressions against projections by pointer identity, widens projection list if needed to include referenced column names not in SELECT list - `sortAndTrimProjections()`: Applies sort and trims extra columns Refactored `GroupByPlanner::resolveSortOrdinals()` and `addSort()` to use these utilities, reducing code duplication and improving maintainability. Differential Revision: D96411887
peterenescu
added a commit
to peterenescu/verax
that referenced
this pull request
Mar 13, 2026
…ebookincubator#1051) Summary: Extracts GROUP BY sort handling utilities into reusable functions in ParserUtils.cpp/h: - `widenProjectionsForSort()`: Matches sort key expressions against projections by pointer identity, widens projection list if needed to include referenced column names not in SELECT list - `sortAndTrimProjections()`: Applies sort and trims extra columns Refactored `GroupByPlanner::resolveSortOrdinals()` and `addSort()` to use these utilities, reducing code duplication and improving maintainability. Differential Revision: D96411887
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.
Summary:
Extracts GROUP BY sort handling utilities into reusable functions in ParserUtils.cpp/h:
widenProjectionsForSort(): Matches sort key expressions against projections by pointer identity, widens projection list if needed to include referenced column names not in SELECT listsortAndTrimProjections(): Applies sort and trims extra columnsRefactored
GroupByPlanner::resolveSortOrdinals()andaddSort()to use these utilities, reducing code duplication and improving maintainability.Differential Revision: D96411887