Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Oct 22, 2024
1 parent ba22fd8 commit 0ece979
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/sqlparser/tests/sqlparser_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1906,9 +1906,15 @@ fn parse_explain_with_invalid_options() {

let res = parse_sql_statements("EXPLAIN (VERBOSE, ) SELECT sqrt(id) FROM foo");

let err_msg =
"expected one of VERBOSE or TRACE or TYPE or LOGICAL or PHYSICAL or DISTSQL, found: )";
assert!(format!("{}", res.unwrap_err()).contains(err_msg));
let expected =
"expected one of VERBOSE or TRACE or TYPE or LOGICAL or PHYSICAL or DISTSQL or FORMAT, found: )";
let actual = res.unwrap_err().to_string();
assert!(
actual.contains(expected),
"expected: {:?}\nactual: {:?}",
expected,
actual
);
}

#[test]
Expand Down

0 comments on commit 0ece979

Please sign in to comment.