fix redundant brackets in Hive/Snowflake/Redshift (#1229)

This commit is contained in:
Yuval Shkolar 2024-04-24 14:56:09 +03:00 committed by GitHub
parent ce85084deb
commit 547c5cde14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 9 deletions

View file

@ -9275,3 +9275,16 @@ fn parse_sized_list() {
let sql = r#"SELECT data::FLOAT[1536] FROM embeddings"#;
dialects.verified_stmt(sql);
}
#[test]
fn insert_into_with_parentheses() {
let dialects = TestedDialects {
dialects: vec![
Box::new(SnowflakeDialect {}),
Box::new(RedshiftSqlDialect {}),
Box::new(GenericDialect {}),
],
options: None,
};
dialects.verified_stmt("INSERT INTO t1 (id, name) (SELECT t2.id, t2.name FROM t2)");
}