mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
re-introduce test using postgres dialect
This commit is contained in:
parent
44ceedaf05
commit
83812914bd
1 changed files with 9 additions and 2 deletions
|
@ -11125,8 +11125,15 @@ fn parse_trailing_comma() {
|
|||
);
|
||||
trailing_commas.verified_stmt(r#"SELECT "from" FROM "from""#);
|
||||
|
||||
// doesn't allow all trailing commas
|
||||
let trailing_commas = TestedDialects::new(vec![Box::new(GenericDialect {})]);
|
||||
// doesn't allow any trailing commas
|
||||
let trailing_commas = TestedDialects::new(vec![Box::new(PostgreSqlDialect {})]);
|
||||
|
||||
assert_eq!(
|
||||
trailing_commas
|
||||
.parse_sql_statements("SELECT name, age, from employees;")
|
||||
.unwrap_err(),
|
||||
ParserError::ParserError("Expected an expression, found: from".to_string())
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
trailing_commas
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue