mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-30 10:47:22 +00:00
Support Snowflake/BigQuery TRIM. (#975)
This commit is contained in:
parent
5263da68cd
commit
83cb734b3c
5 changed files with 95 additions and 0 deletions
|
@ -5225,6 +5225,30 @@ fn parse_trim() {
|
|||
ParserError::ParserError("Expected ), found: 'xyz'".to_owned()),
|
||||
parse_sql_statements("SELECT TRIM(FOO 'xyz' FROM 'xyzfooxyz')").unwrap_err()
|
||||
);
|
||||
|
||||
//keep Snowflake/BigQuery TRIM syntax failing
|
||||
let all_expected_snowflake = TestedDialects {
|
||||
dialects: vec![
|
||||
//Box::new(GenericDialect {}),
|
||||
Box::new(PostgreSqlDialect {}),
|
||||
Box::new(MsSqlDialect {}),
|
||||
Box::new(AnsiDialect {}),
|
||||
//Box::new(SnowflakeDialect {}),
|
||||
Box::new(HiveDialect {}),
|
||||
Box::new(RedshiftSqlDialect {}),
|
||||
Box::new(MySqlDialect {}),
|
||||
//Box::new(BigQueryDialect {}),
|
||||
Box::new(SQLiteDialect {}),
|
||||
Box::new(DuckDbDialect {}),
|
||||
],
|
||||
options: None,
|
||||
};
|
||||
assert_eq!(
|
||||
ParserError::ParserError("Expected ), found: 'a'".to_owned()),
|
||||
all_expected_snowflake
|
||||
.parse_sql_statements("SELECT TRIM('xyz', 'a')")
|
||||
.unwrap_err()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue