-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report correct error for value lists in joins (#156)
Some SQL syntax does not pass a table prefix (atom or string) In the case of `create_name`, then third param may be a string or atom prefix ... and in those cases should be treated as a prefix. However syntax such as `VALUES (...)` will pass in the values list information as the third tuple. this was causing spurious exceptions to be thrown, rather than creating the correct table name Introduce `assert_valid_join` which checks for unsupported join syntax This improves the error messages for `JOIN VALUES (...) AS` clauses which were being mistakenly tagged as a table prefixing issue. Now the user gets a more accurate message. It also puts all the join syntax checking into a single function which makes it a bit eaiser to reason about (e.g. that hints, values, etc. are not OK, but other join constructs are)
- Loading branch information
Showing
2 changed files
with
40 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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