mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-30 10:47:22 +00:00
Fix parsing of COLLATE after parentheses in expressions (#507)
This commit is contained in:
parent
901f5b974f
commit
0fa812bd2b
2 changed files with 20 additions and 10 deletions
|
@ -561,6 +561,15 @@ fn parse_collate() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_collate_after_parens() {
|
||||
let sql = "SELECT (name) COLLATE \"de_DE\" FROM customer";
|
||||
assert_matches!(
|
||||
only(&all_dialects().verified_only_select(sql).projection),
|
||||
SelectItem::UnnamedExpr(Expr::Collate { .. })
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_select_string_predicate() {
|
||||
let sql = "SELECT id, fname, lname FROM customer \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue