Skip to content

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

Open
@johnedquinn

Description

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).

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions