tomershaniii commented on code in PR #1521:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1521#discussion_r1850223004
##########
tests/sqlparser_snowflake.rs:
##########
@@ -2846,3 +2846,17 @@ fn test_parse_show_columns_sql() {
snowflake().verified_stmt("SHOW COLUMNS IN TABLE abc");
snowflake().verified_stmt("SHOW COLUMNS LIKE '%xyz%' IN TABLE abc");
}
+
+#[test]
+fn test_projection_with_nested_trailing_commas() {
+ let sql = "SELECT a FROM b, LATERAL FLATTEN(input => events)";
+ let _ = snowflake().parse_sql_statements(&sql).unwrap();
+
+ //Single nesting
+ let sql = format!("SELECT ({sql})");
+ let _ = snowflake().parse_sql_statements(&sql).unwrap();
+
+ //Double nesting
+ let sql = format!("SELECT ({sql})");
+ let _ = snowflake().parse_sql_statements(&sql).unwrap();
Review Comment:
👍
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]