mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 19:27:21 +00:00
Don't panic on weird infix garbage
Co-authored-by: Nikhil Benesch <nikhil.benesch@gmail.com>
This commit is contained in:
parent
908082d26f
commit
143846d333
2 changed files with 10 additions and 1 deletions
|
@ -209,6 +209,15 @@ fn parse_not() {
|
|||
//TODO: add assertions
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_invalid_infix_not() {
|
||||
let res = parse_sql_statements("SELECT c FROM t WHERE c NOT (");
|
||||
assert_eq!(
|
||||
ParserError::ParserError("Expected IN or BETWEEN after NOT, found: (".to_string()),
|
||||
res.unwrap_err(),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_collate() {
|
||||
let sql = "SELECT name COLLATE \"de_DE\" FROM customer";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue