iffyio commented on code in PR #1891: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1891#discussion_r2159883149
########## src/parser/mod.rs: ########## @@ -10589,9 +10580,23 @@ impl<'a> Parser<'a> { name, data_type, options, + options_comma_separated: !dialect_of!(self is SnowflakeDialect), Review Comment: Instead of introducing a new flag, can we change the datatype of `options` to be an enum that encodes the same information? Something like the following ```rust enum ColumnOptions { CommaSeparated(Vec<ColumnOption>), SpaceSeparated(Vec<ColumnOption>) } options: Option<ColumnOptions> ``` ########## tests/sqlparser_snowflake.rs: ########## @@ -4082,3 +4084,16 @@ fn parse_connect_by_root_operator() { "sql parser error: Expected an expression, found: FROM" ); } + +#[test] +fn test_snowflake_create_view_with_tag() { + let create_view_with_tag = r#"CREATE VIEW X (COL WITH TAG (pii='email')) AS SELECT * FROM Y"#; + snowflake().verified_stmt(create_view_with_tag); +} + +#[test] +fn test_snowflake_create_view_with_tag_and_comment() { + let create_view_with_tag_and_comment = + r#"CREATE VIEW X (COL WITH TAG (pii='email') COMMENT 'foobar') AS SELECT * FROM Y"#; + snowflake().verified_stmt(create_view_with_tag_and_comment); +} Review Comment: Can we merge both scenarios into a single test? e.g called `test_snowflake_create_view_options` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org