mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
fix for maybe_parse preventing parser from erroring on recursion limit (#1464)
This commit is contained in:
parent
38f1e573fe
commit
8e0d26abb3
19 changed files with 422 additions and 570 deletions
|
@ -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 {})])
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue