moshap-firebolt opened a new pull request, #2377:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2377
PostgreSQL accepts join chains where ON clauses are deferred to the end,
e.g.:
t0 JOIN t1 JOIN t2 ON c1 ON c2
This is equivalent to `t0 JOIN (t1 JOIN t2 ON c1) ON c2` per the SQL
standard's
right-associative interpretation when parentheses are absent. PostgreSQL
documents
this in its JOIN syntax:
https://www.postgresql.org/docs/current/queries-table-expressions.html#QUERIES-JOIN
The parser already handles this correctly for dialects that return `false`
from
`supports_left_associative_joins_without_parens()` (Snowflake does this). The
PostgreSQL dialect was missing the override and fell through to the default
`true`,
causing a parse error on any right-deep chain of depth >= 3.
This adds the override and a test that verifies both the parse and the
canonical
round-trip serialization (with explicit parens).
`cargo test --all-features` passes locally.
--
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]