Skip to content

Wrapping SQL "VALUES" #6328

@philrz

Description

@philrz

This doesn't currently parse.

$ super -c "
values [VALUES
  (1, 'Alice Chen', 10, 'Manager', 'Sales'),
  (2, 'Bob Smith', 10, 'Manager', 'Marketing')]"

no such function at line 2, column 9:
values [VALUES
        ~~~~~~

Details

Repro is with super commit bec8934.

This works as expected:

$ super -version
Version: bec8934e0

$ super -c "
VALUES               
  (1, 'Alice Chen', 10, 'Manager', 'Sales'),
  (2, 'Bob Smith', 10, 'Manager', 'Marketing')"

{c0:1,c1:"Alice Chen",c2:10,c3:"Manager",c4:"Sales"}
{c0:2,c1:"Bob Smith",c2:10,c3:"Manager",c4:"Marketing"}

But when I wrapped it with [ ] it no longer parsed.

Upon observing the repro, @mccanne said it should be fixable, adding:

That's parsing as an array literal with two elems values(...) and tuple (2...)

Metadata

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