mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
Improve error messages with additional colons (#1319)
This commit is contained in:
parent
79af31b672
commit
f16c1afed0
11 changed files with 144 additions and 144 deletions
|
@ -284,7 +284,7 @@ fn set_statement_with_minus() {
|
|||
assert_eq!(
|
||||
hive().parse_sql_statements("SET hive.tez.java.opts = -"),
|
||||
Err(ParserError::ParserError(
|
||||
"Expected variable value, found: EOF".to_string()
|
||||
"Expected: variable value, found: EOF".to_string()
|
||||
))
|
||||
)
|
||||
}
|
||||
|
@ -327,14 +327,14 @@ fn parse_create_function() {
|
|||
assert_eq!(
|
||||
unsupported_dialects.parse_sql_statements(sql).unwrap_err(),
|
||||
ParserError::ParserError(
|
||||
"Expected an object type after CREATE, found: FUNCTION".to_string()
|
||||
"Expected: an object type after CREATE, found: FUNCTION".to_string()
|
||||
)
|
||||
);
|
||||
|
||||
let sql = "CREATE TEMPORARY FUNCTION mydb.myfunc AS 'org.random.class.Name' USING JAR";
|
||||
assert_eq!(
|
||||
hive().parse_sql_statements(sql).unwrap_err(),
|
||||
ParserError::ParserError("Expected literal string, found: EOF".to_string()),
|
||||
ParserError::ParserError("Expected: literal string, found: EOF".to_string()),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -398,7 +398,7 @@ fn parse_delimited_identifiers() {
|
|||
assert_eq!(&Expr::Identifier(Ident::with_quote('"', "simple id")), expr);
|
||||
assert_eq!(&Ident::with_quote('"', "column alias"), alias);
|
||||
}
|
||||
_ => panic!("Expected ExprWithAlias"),
|
||||
_ => panic!("Expected: ExprWithAlias"),
|
||||
}
|
||||
|
||||
hive().verified_stmt(r#"CREATE TABLE "foo" ("bar" "int")"#);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue