iffyio commented on code in PR #1961:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1961#discussion_r2229297004


##########
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:
   Ah alright, in that case yeah I think we could skip the dialect methods 
entirely and let the parser accept either format if they show up? Also we can 
add a comment flagging that the second format is supported by snowflake but is 
undocumented



-- 
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

Reply via email to