LucaCappelletti94 opened a new pull request, #2633:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2633

   `SELECT * FROM t JOIN ON` parses in every dialect, with `ON` taken as a 
table name, while PostgreSQL rejects it with `syntax error at or near "ON"`. 
This enforces `Dialect::is_table_factor` at the table name position and adds 
`ON` to `RESERVED_FOR_TABLE_FACTOR`, so unquoted INTO, LIMIT, HAVING, WHERE and 
ON stop being table names. Quoted forms still parse.
   
   Dialects whose documentation leaves one of these words unreserved keep 
accepting it.
   
   That covers every keyword in ClickHouse and `LIMIT` in Databricks, Hive, 
MSSQL and Oracle. Snowflake's own list now applies to table names too, so 
`parse_count_wildcard` renames its `Order` table. I hope I have covered all of 
the dialects, as I am not too familiar with some.
   
   #2629 pins today's error for `SELECT * FROM users |> JOIN ON users.id = 
orders.user_id`, and this changes it to `Expected: table name, found: ON`. 
Whichever of the two merges second updates that pin.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to