dialect_is!(...) or dialect_of!(... | ...). Instead, define a new function in the Dialect trait that describes the condition, so that dialects can turn this condition on more easily.tests module in the corresponding dialect file (e.g., tests/sqlparser_redshift.rs for Redshift), and should be placed at the end of the file.tests/sqlparser_common.rs.r#"..."# to preserve formatting.<dialect>().verified_stmt(r#"..."#);
For example: snowflake().verified_stmt(r#"SELECT * FROM my_table"#). Use one_statement_parses_to instead of verified_stmt when you expect the SQL created by the AST to differ than the input SQL. For example:
snowflake().one_statement_parses_to( "SELECT * FROM my_table t", "SELECT * FROM my_table AS t", )
You can try to simplify the SQL statement to identify the root cause of the parsing issue. This may involve removing certain clauses or components of the SQL statement to see if it can be parsed successfully. Additionally, you can compare the problematic SQL statement with similar statements that are parsed correctly to identify any differences that may be causing the issue.
Run the following commands before you commit to ensure the change will pass the CI process:
cargo test --all-features cargo fmt --all cargo clippy --all-targets --all-features -- -D warnings
<DIALECT>: <SHORT DESCRIPTION>, For example, Showflake: Add support for casting to VARIANT.