Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore SQL-consistent syntax for joins #1013

Open
vgapeyev opened this issue Mar 20, 2023 · 0 comments
Open

Explore SQL-consistent syntax for joins #1013

vgapeyev opened this issue Mar 20, 2023 · 0 comments
Labels
enhancement New feature or request PartiQLSpec Features from the PartiQL Spec

Comments

@vgapeyev
Copy link
Contributor

vgapeyev commented Mar 20, 2023

PartiQL grammar for join expressions currently allows syntax that is not in SQL:

  • OUTER JOIN -- OUTER must come with LEFT, RIGHT, or FULL, not by itself;
  • LEFT OUTER CROSS JOIN , RIGHT CROSS JOIN, and other variations of joinType CROSS JOIN -- in SQL, CROSS JOIN is a thing on its own, without further qualification.

While PartiQL sometimes extends SQL syntax in order to anchor constructs with PartiQL-specific semantics distinct from SQL (for example, SELECT VALUE), this does not appear to be the case here. Also, since this involves only the syntactic tokens from the domain of joins -- just in new combinations -- this is particularly confusing/misleading.

Some of this syntax appears in the specification, while there is lore suggesting that LEFT CROSS JOIN is there to work around grammar ambiguity in the presence on the ON condition clause in a join.

The purpose of this ticket it to experiment with the grammar to understand whether there is indeed an issue with SQL-consistent syntax and explore whether it can be resolved. Upon resolution, this will entail adjustments to the specification as well, but those should be purely narrative.

See also partiql-spec #41.

@vgapeyev vgapeyev added enhancement New feature or request PartiQLSpec Features from the PartiQL Spec labels Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PartiQLSpec Features from the PartiQL Spec
Projects
None yet
Development

No branches or pull requests

1 participant