fix for maybe_parse preventing parser from erroring on recursion limit (#1464)

This commit is contained in:
tomershaniii 2024-10-21 22:41:34 +03:00 committed by GitHub
parent 38f1e573fe
commit 8e0d26abb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 422 additions and 570 deletions

View file

@ -418,10 +418,7 @@ fn parse_create_function() {
}
// Test error in dialect that doesn't support parsing CREATE FUNCTION
let unsupported_dialects = TestedDialects {
dialects: vec![Box::new(MsSqlDialect {})],
options: None,
};
let unsupported_dialects = TestedDialects::new(vec![Box::new(MsSqlDialect {})]);
assert_eq!(
unsupported_dialects.parse_sql_statements(sql).unwrap_err(),
@ -538,15 +535,9 @@ fn parse_use() {
}
fn hive() -> TestedDialects {
TestedDialects {
dialects: vec![Box::new(HiveDialect {})],
options: None,
}
TestedDialects::new(vec![Box::new(HiveDialect {})])
}
fn hive_and_generic() -> TestedDialects {
TestedDialects {
dialects: vec![Box::new(HiveDialect {}), Box::new(GenericDialect {})],
options: None,
}
TestedDialects::new(vec![Box::new(HiveDialect {}), Box::new(GenericDialect {})])
}