-
Notifications
You must be signed in to change notification settings - Fork 346
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
Flat Join produces invalid SQL #2671
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version: (e.g.
3.16.5
)Module: (e.g.
quill-jdbc
)Database: (e.g.
postgres
)We found ourselves behind on quill versions and are working on upgrading. Before making the jump to 4.x, we pinned ourselves to (at the time) the highest 3.x. As this version as been adopted we found this bug. We are testing to see if it persists on 4.x and will update this issue when we find more.
We found that flat join code that produced valid SQL in 3.5.1, produced invalid SQL in 3.16.5. Depending on the schemas being joined this could produce syntactically correct but logically invalid SQL, leading to subtly wrong behavior.
Expected behavior
Quotes compile to the same SQL across versions.
Actual behavior
Quotes don't compile to the same SQL across versions.
Steps to reproduce the behavior
Given this example query:
Quill 3.5.1 produced this valid SQL:
But Quill 3.16.5 produces this SQL (note the aliases used in the
WHERE
andSELECT
clauses):Workaround
Modifying my flat-join code to this produces the logically correct SQL that matches the behavior, although not exactly the syntax, of the 3.5.1 SQL:
@getquill/maintainers
The text was updated successfully, but these errors were encountered: