Repository navigation
perf(compile): read SQL-test relation markers from the parse tree - #932
Merged
Merged
Conversation
SQL-test planning found each model's FROM and JOIN marker calls by streaming the parsed statement through a serializer that reproduced the original JSON walk. The planner now reads those relations directly from the parse tree in the same pre-order: each node's FROM markers, then its JOIN markers, then its children in declared field order. The serializer could never fail on a parsed statement, so its error path is removed. The JSON-walk oracle still pins the order, with more relation shapes and dialects. Native planning CPU drops by about 18 percent on dense projects; plans and compile output are unchanged.
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.
Why
SQL-test planning converted each parsed model to a streaming serialised form to find relation markers: about 19% of native planning CPU and ~810 lines of collector code. Reusing model-analysis parses instead isn't possible without changing output, because the two phases parse different SQL text (CHI-441 phase 2).
Changes
Verification
make test,make check-ci.