Skip to content

Conversation

@orisano
Copy link
Contributor

@orisano orisano commented Jul 15, 2023

fix #2271

In the current grammar, the LEFT part of LEFT JOIN was recognized as table_alias.

lemon has a fallback directive that treats it as a KEYWORD and treats it as an identifier if parsing fails.
ref: https://sqlite.org/src/doc/trunk/doc/lemon.html#pfallback

The rule has been modified to match this behavior.
Add a table_alias_fallback rule that also includes KEYWORD to lower the precedence to match SQLite's behavior.

orisano added 2 commits July 16, 2023 00:34
changed rules to conform to fallback directive behavior

fix sqlc-dev#2271
@kyleconroy kyleconroy merged commit c236b74 into sqlc-dev:main Jul 24, 2023
alfonsodev pushed a commit to ExponentiaTeam/sqlc that referenced this pull request Oct 13, 2025
* fix(engine/sqlite): fix table_alias rules

changed rules to conform to fallback directive behavior

fix sqlc-dev#2271

* test: update endtoend

* Update parser code

---------

Co-authored-by: Kyle Conroy <kyle@sqlc.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants