iffyio commented on code in PR #1881: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1881#discussion_r2140423966
########## tests/sqlparser_snowflake.rs: ########## @@ -446,6 +446,18 @@ fn test_snowflake_create_table_if_not_exists() { } _ => unreachable!(), } + + for sql in [ + r#"CREATE TABLE IF NOT EXISTS "A"."B"."C" (v VARIANT)"#, + r#"CREATE TABLE "A"."B"."C" IF NOT EXISTS (v VARIANT)"#, + r#"CREATE TRANSIENT TABLE IF NOT EXISTS "A"."B"."C" (v VARIANT)"#, + r#"CREATE TRANSIENT TABLE "A"."B"."C" IF NOT EXISTS (v VARIANT)"#, + ] { + // We don't use `verified_stmt` here because the parser won't produce a 1:1 result of the + // query. We will always put the `IF NOT EXIST` before the column name when displaying the + // query. + assert!(snowflake().parse_sql_statements(sql).is_ok()); Review Comment: ah for this behavior I think we can use [one_statement_parse_to](https://github.com/apache/datafusion-sqlparser-rs/blob/06c6b35e9739221b7e5c7bf28e77fb6e23246875/tests/sqlparser_snowflake.rs#L1008-L1011) that provides the canonical form to assert on -- 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