iffyio commented on code in PR #1521: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1521#discussion_r1846835763
########## 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: Can we instead write out the sql explicitly? I think that makes it easier to figure out what is being tested, and easier to change if needed going forward -- 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