Skip to content

Conversation

@romanoff
Copy link
Contributor

Add snowflake dynamic table parsing. Reference to spec:
https://docs.snowflake.com/en/sql-reference/sql/alter-dynamic-table

Example of sql:

ALTER DYNAMIC TABLE MY_DYNAMIC_TABLE REFRESH;
ALTER DYNAMIC TABLE MY_DYNAMIC_TABLE SUSPEND;
ALTER DYNAMIC TABLE MY_DYNAMIC_TABLE RESUME;

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @romanoff! The changes look reasonable to me, left a comment

Comment on lines 3584 to +3587
if self.iceberg {
write!(f, "ALTER ICEBERG TABLE ")?;
} else if self.dynamic {
write!(f, "ALTER DYNAMIC TABLE ")?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we replace the iceberg:bool field with an enum instead? thinking so that we don't accumulate booleans over time (e.g. its not clear or enforceable that iceberg and dynamic are mutually exclusive).

e.g.

enum AlterTableType {
    Iceberg
    Dynamic
}
Statement::AlterTable { table_type: AlterTableType }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants