Skip to content

Add support for snowflake cluster by expressions #1882

Closed
@osipovartem

Description

@osipovartem
CLUSTER BY (to_date(ts), coalesce(foo, 'bar'))

Failed with ParserError("Expected: ), found: (
https://docs.snowflake.com/en/user-guide/tables-clustering-keys#defining-a-clustering-key-for-a-table

We need to extend/change CreateTable cluster_by type from

pub cluster_by: Option<WrappedCollection<Vec<Ident>>>,

to

pub cluster_by: Option<WrappedCollection<Vec<Expr>>>,

This allows statements like CLUSTER BY (to_date(start_tstamp)) to be parsed correctly.

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