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

Define the allowable syntax for updateTarget in PartiQL's grammar #1671

Open
johnedquinn opened this issue Dec 5, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@johnedquinn
Copy link
Member

Description

  • The SQL:1999 EBNF states that an <update target> is either a column or a column followed by brackets with a simple value inside those brackets. Historically, in PartiQL, an ANTLR rule called pathSimple used to do represent this (plus allow for multiple steps, rather than the single step allowed by SQL:1999).
  • This, however, was unspecified. Not the end of the world, but what it also introduced was the ability to write: SET x[y][z] = 3 in an update statement. In Adds DML (INSERT, DELETE, UPDATE, UPSERT, REPLACE) #1666, I didn't add this back as I think it requires further investigation before being added to a productionized AST. Was this intentional? Is it used anywhere currently?

To Reproduce

See the file diff in #1666.

To Do

  • Get to the bottom of this, document it, and potentially re-add the EBNF rule (as well as the modelling in the AST).
@johnedquinn johnedquinn added the bug Something isn't working label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant