-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Column does not exist" when selecting a subquery column #2989
Comments
Simplified test case: https://play.sqlc.dev/p/cefb6385989c2516f3d658e88e9f236f68973bcca0d63c60c4aa4d32a9221b46 |
Jille
added a commit
to Jille/sqlc
that referenced
this issue
Feb 27, 2024
issue sqlc-dev#2989, sqlc-dev#2400 and probably others
kyleconroy
pushed a commit
that referenced
this issue
Mar 28, 2024
* fix(resolve): fix resolving reference to CTEs Fixed resolving refs to CTEs by adding CTEs to the aliasMap and indexing its columns when resolving catalog references. Fix #3219 * feat(compiler): Support subqueries in the FROM clause issue #2989, #2400 and probably others --------- Co-authored-by: Simon Klee <[email protected]>
Jille
added a commit
to Jille/sqlc
that referenced
this issue
Apr 3, 2024
issue sqlc-dev#2989, sqlc-dev#2400 and probably others
kyleconroy
pushed a commit
that referenced
this issue
Apr 4, 2024
…#3310) * fix(resolve): fix resolving reference to CTEs Fixed resolving refs to CTEs by adding CTEs to the aliasMap and indexing its columns when resolving catalog references. Fix #3219 * feat(compiler): Support subqueries in the FROM clause issue #2989, #2400 and probably others * chore(endtoend): Bump version in cte_resolve_ref to 1.26.0 to appease CI --------- Co-authored-by: Simon Klee <[email protected]>
Jille
added a commit
to Jille/sqlc
that referenced
this issue
Apr 4, 2024
issue sqlc-dev#2989, sqlc-dev#2400 and probably others
Jille
added a commit
to Jille/sqlc
that referenced
this issue
Apr 4, 2024
issue sqlc-dev#2989, sqlc-dev#2400 and probably others
simonklee
pushed a commit
to simonklee/sqlc
that referenced
this issue
Apr 9, 2024
issue sqlc-dev#2989, sqlc-dev#2400 and probably others
simonklee
pushed a commit
to simonklee/sqlc
that referenced
this issue
Apr 9, 2024
issue sqlc-dev#2989, sqlc-dev#2400 and probably others
lisitsky
pushed a commit
to lisitsky/sqlc
that referenced
this issue
Jun 21, 2024
* fix(resolve): fix resolving reference to CTEs Fixed resolving refs to CTEs by adding CTEs to the aliasMap and indexing its columns when resolving catalog references. Fix sqlc-dev#3219 * feat(compiler): Support subqueries in the FROM clause issue sqlc-dev#2989, sqlc-dev#2400 and probably others --------- Co-authored-by: Simon Klee <[email protected]>
lisitsky
pushed a commit
to lisitsky/sqlc
that referenced
this issue
Jun 21, 2024
…sqlc-dev#3310) * fix(resolve): fix resolving reference to CTEs Fixed resolving refs to CTEs by adding CTEs to the aliasMap and indexing its columns when resolving catalog references. Fix sqlc-dev#3219 * feat(compiler): Support subqueries in the FROM clause issue sqlc-dev#2989, sqlc-dev#2400 and probably others * chore(endtoend): Bump version in cte_resolve_ref to 1.26.0 to appease CI --------- Co-authored-by: Simon Klee <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
1.23.0
What happened?
The column(s) in the
SELECT
statement is present in the subquery from which I'm selecting, butsqlc
tells me otherwhise.PS: I had to add table names to the columns in the subquery to make other
sqlc
errors about ambiguity disappear, but the query works fine in MySQL even without them.Relevant log output
Database schema
SQL queries
Configuration
Playground URL
No response
What operating system are you using?
macOS
What database engines are you using?
MySQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: