Skip to content

Can't parse valid Snowflake compound expression #1833

Open
@ramnes

Description

@ramnes

Hey there, thanks for the great project!

I'm encountering an issue with the following query, which is valid in Snowflake:

SELECT v.$2 FROM (VALUES (1, 'value1'), (2, 'value2')) AS v

It can't get parsed with sqlparser-rs:

Expected: an identifier or a '*' after '.', found: $2 at Line: 1, Column: 10

While this syntax isn't valid in PostgreSQL, it is accepted by Snowflake. SELECT $2 FROM ... (without the alias) parses correctly, so it seems the parser has trouble with positional parameters when they're part of compound expressions.

Is this a gap in the Snowflake dialect implementation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions