Skip to content

Conversation

@orisano
Copy link
Contributor

@orisano orisano commented Aug 3, 2023

close #2569
close #1722

astutils.Search does not stop traversing in the middle, so it returns redundant table nodes under ast.RangeSubselect.
I solved this problem by adding a visitor to ast.RangeSubselect that does not traverse the child nodes of ast.RangeSubselect.

@kyleconroy kyleconroy merged commit fb9e375 into sqlc-dev:main Aug 28, 2023
alfonsodev pushed a commit to ExponentiaTeam/sqlc that referenced this pull request Oct 13, 2025
… retrieving table listing (sqlc-dev#2573)

* fix(compiler): Fix to not scan children under ast.RangeSubselect when retrieving table listing

close sqlc-dev#2569

* test: add endtoend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

select * from a subquery selects all columns for all tables in the subquery Invalid row fields for selecting * from subquery with distinct

2 participants