feat: support qualified single-table select columns - #32
Closed
JagritGumber wants to merge 1 commit into
Closed
Conversation
JagritGumber
added a commit
that referenced
this pull request
Apr 19, 2026
…solver When a query contains the JOIN keyword, route each SELECT column through the multi-table resolver from parser::joins (landed in the prior PR). Qualified columns now resolve across the alias map and land in QueryDef.returns with source_table populated. Queries without JOIN keep the existing single-table path unchanged — ensure_supported_select_expr still rejects qualified selects there. Lifting that restriction for single-table queries is a separate effort (PR #32 was in flight before this series). Changes: - resolve_return_columns gains a &[TableDef] schema_tables param - JOIN_DETECT_RE gates multi-table resolution - resolve_return_columns_multi_table rejects SELECT * across joins with a clear v1.2 pointer - Parser propagates schema_tables from parse_queries to resolve_return_columns Tests: - 5 new postgres parser unit tests (qualified columns, AS aliases, SELECT * rejection, LEFT JOIN rejection, single-table rejection still active) - Updated the cli test that was asserting the old rejection — it now asserts the JOIN query succeeds (renamed from cli_generate_rejects_ qualified_selects to cli_generate_accepts_multi_table_inner_join) 158 lib + 11 CLI + 2 e2e + 4 typecheck tests all pass. Clippy clean.
4 tasks
JagritGumber
added a commit
that referenced
this pull request
Apr 20, 2026
…solver When a query contains the JOIN keyword, route each SELECT column through the multi-table resolver from parser::joins (landed in the prior PR). Qualified columns now resolve across the alias map and land in QueryDef.returns with source_table populated. Queries without JOIN keep the existing single-table path unchanged — ensure_supported_select_expr still rejects qualified selects there. Lifting that restriction for single-table queries is a separate effort (PR #32 was in flight before this series). Changes: - resolve_return_columns gains a &[TableDef] schema_tables param - JOIN_DETECT_RE gates multi-table resolution - resolve_return_columns_multi_table rejects SELECT * across joins with a clear v1.2 pointer - Parser propagates schema_tables from parse_queries to resolve_return_columns Tests: - 5 new postgres parser unit tests (qualified columns, AS aliases, SELECT * rejection, LEFT JOIN rejection, single-table rejection still active) - Updated the cli test that was asserting the old rejection — it now asserts the JOIN query succeeds (renamed from cli_generate_rejects_ qualified_selects to cli_generate_accepts_multi_table_inner_join) 158 lib + 11 CLI + 2 e2e + 4 typecheck tests all pass. Clippy clean.
4 tasks
Owner
Author
|
Superseded by #66 — same feature, rebased + integrated with the INNER JOIN multi-table resolver work that landed after this PR was written. |
Owner
Author
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
Verification