Skip to content

Commit

Permalink
Upgrade sqlparser version to 0.49 (#1571)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaCappelletti94 authored Sep 6, 2024
1 parent 7b7b60c commit 23b9c43
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ iter-enum = "1"
itertools = "0.12"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sqlparser = { version = "0.48", features = ["serde", "bigdecimal"] }
sqlparser = { version = "0.49", features = ["serde", "bigdecimal"] }
thiserror = "1.0"
strum_macros = "0.25"
bigdecimal = { version = "0.4.1", features = ["serde", "string-only"] }
Expand Down
1 change: 1 addition & 0 deletions core/src/translate/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ pub fn translate_order_by_expr(sql_order_by_expr: &SqlOrderByExpr) -> Result<Ord
expr,
asc,
nulls_first,
..
} = sql_order_by_expr;

if nulls_first.is_some() {
Expand Down
3 changes: 1 addition & 2 deletions core/src/translate/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ pub fn translate_query(sql_query: &SqlQuery) -> Result<Query> {
let body = translate_set_expr(body)?;
let order_by = order_by
.iter()
.map(translate_order_by_expr)
.flat_map(|order_by| order_by.exprs.iter().map(translate_order_by_expr))
.collect::<Result<_>>()?;

let limit = limit.as_ref().map(translate_expr).transpose()?;
let offset = offset
.as_ref()
Expand Down

0 comments on commit 23b9c43

Please sign in to comment.