LucaCappelletti94 opened a new pull request, #2667: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2667
In SQLite the comma between tables is a join operator, and every join operator may be followed by a join constraint (https://www.sqlite.org/syntax/join-clause.html). SQLite 3.51.1 runs `SELECT * FROM t, u ON t.a = u.a`, `SELECT * FROM t, u USING (a)` and chains such as `t, u ON ..., v ON ...`, while PostgreSQL 16 and DuckDB 1.4.4 reject all of them. The SQLite dialect failed with `Expected: end of statement, found: ON`. A new dialect method, `supports_comma_join_constraint`, is enabled for SQLite and the generic dialect. When the table after a comma is followed by `ON` or `USING`, the `FROM` list parser turns it into a `JOIN` of the previous table and keeps parsing joins after it. Each table is parsed once, so nested derived tables stay linear. Tests cover `SELECT` and `UPDATE ... FROM` forms in SQLite and the generic dialect, and the exact error in every other dialect. -- 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]
