iffyio commented on code in PR #1961: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1961#discussion_r2218861730
########## tests/sqlparser_common.rs: ########## @@ -16183,3 +16190,21 @@ fn test_identifier_unicode_start() { ]); let _ = dialects.verified_stmt(sql); } + +#[test] +fn parse_create_view_if_not_exists() { + let sql = "CREATE VIEW IF NOT EXISTS v AS SELECT 1"; + let dialects = TestedDialects::new(vec![ + Box::new(SnowflakeDialect {}), + Box::new(GenericDialect {}), + Box::new(SQLiteDialect {}), + Box::new(BigQueryDialect {}), + ]); + let _ = dialects.verified_stmt(sql); + let sql = "CREATE VIEW v IF NOT EXISTS AS SELECT 1"; Review Comment: From a quick look I couldn't find which dialects in practice support this syntax? Do you have a link to documentation for one such dialect? related the MR not super sure it would be necessary to have this behavior covered by a flag and the parser can always look to accept `CREATE VIEW IF NOT EXISTS v`, as well as the other syntax if its relevant) -- 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