Improve error messages with additional colons (#1319)

This commit is contained in:
Lorrens Pantelis 2024-06-22 00:26:23 +02:00 committed by GitHub
parent 79af31b672
commit f16c1afed0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 144 additions and 144 deletions

View file

@ -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")"#);