From 23b9c43adf64e5e032772a7de2e3f9190044ad9e Mon Sep 17 00:00:00 2001 From: Luca Cappelletti Date: Fri, 6 Sep 2024 13:17:09 +0200 Subject: [PATCH] Upgrade sqlparser version to 0.49 (#1571) --- Cargo.lock | 4 ++-- core/Cargo.toml | 2 +- core/src/translate/expr.rs | 1 + core/src/translate/query.rs | 3 +-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3c60d2413..a75f1b377 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3320,9 +3320,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "sqlparser" -version = "0.48.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749780d15ad1ee15fd74f5f84b0665560b6abb913de744c2b69155770f9601da" +checksum = "a4a404d0e14905361b918cb8afdb73605e25c1d5029312bd9785142dcb3aa49e" dependencies = [ "bigdecimal", "log", diff --git a/core/Cargo.toml b/core/Cargo.toml index 612fc9542..3ff00f89e 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -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"] } diff --git a/core/src/translate/expr.rs b/core/src/translate/expr.rs index 3cb2523b7..39c910034 100644 --- a/core/src/translate/expr.rs +++ b/core/src/translate/expr.rs @@ -208,6 +208,7 @@ pub fn translate_order_by_expr(sql_order_by_expr: &SqlOrderByExpr) -> Result Result { 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::>()?; - let limit = limit.as_ref().map(translate_expr).transpose()?; let offset = offset .as_ref()