From 3b52320f977d365a26c4c6470fab236515e7053a Mon Sep 17 00:00:00 2001 From: Mikhail Cheshkov Date: Tue, 3 Sep 2024 03:54:58 +0300 Subject: [PATCH] [WIP] Bump sqlparser to 0.17 --- Cargo.lock | 4 ++-- datafusion-cli/Cargo.lock | 4 ++-- datafusion/common/Cargo.toml | 2 +- datafusion/core/Cargo.toml | 2 +- datafusion/core/src/sql/planner.rs | 5 +++-- datafusion/expr/Cargo.toml | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8527bb7925c7e..b8dc0780e1ec8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2408,8 +2408,8 @@ dependencies = [ [[package]] name = "sqlparser" -version = "0.16.0" -source = "git+https://github.com/cube-js/sqlparser-rs.git?rev=6a54d27d3b75a04b9f9cbe309a83078aa54b32fd#6a54d27d3b75a04b9f9cbe309a83078aa54b32fd" +version = "0.17.0" +source = "git+https://github.com/cube-js/sqlparser-rs.git?rev=a593b14adc8cda9a95952fe5a09b038ba94d6f8b#a593b14adc8cda9a95952fe5a09b038ba94d6f8b" dependencies = [ "log", ] diff --git a/datafusion-cli/Cargo.lock b/datafusion-cli/Cargo.lock index 46dbea44665b7..0c5f0f9a6f635 100644 --- a/datafusion-cli/Cargo.lock +++ b/datafusion-cli/Cargo.lock @@ -1530,8 +1530,8 @@ checksum = "45456094d1983e2ee2a18fdfebce3189fa451699d0502cb8e3b49dba5ba41451" [[package]] name = "sqlparser" -version = "0.16.0" -source = "git+https://github.com/cube-js/sqlparser-rs.git?rev=6a54d27d3b75a04b9f9cbe309a83078aa54b32fd#6a54d27d3b75a04b9f9cbe309a83078aa54b32fd" +version = "0.17.0" +source = "git+https://github.com/cube-js/sqlparser-rs.git?rev=a593b14adc8cda9a95952fe5a09b038ba94d6f8b#a593b14adc8cda9a95952fe5a09b038ba94d6f8b" dependencies = [ "log", ] diff --git a/datafusion/common/Cargo.toml b/datafusion/common/Cargo.toml index 8abf1953bfdf7..4ec5597a96967 100644 --- a/datafusion/common/Cargo.toml +++ b/datafusion/common/Cargo.toml @@ -44,4 +44,4 @@ cranelift-module = { version = "0.82.0", optional = true } ordered-float = "2.10" parquet = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "a03d4eef5640e05dddf99fc2357ad6d58b5337cb", features = ["arrow"], optional = true } pyo3 = { version = "0.16", optional = true } -sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "6a54d27d3b75a04b9f9cbe309a83078aa54b32fd" } +sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "a593b14adc8cda9a95952fe5a09b038ba94d6f8b" } diff --git a/datafusion/core/Cargo.toml b/datafusion/core/Cargo.toml index fc9f766778aaf..d244292270af2 100644 --- a/datafusion/core/Cargo.toml +++ b/datafusion/core/Cargo.toml @@ -79,7 +79,7 @@ pin-project-lite= "^0.2.7" pyo3 = { version = "0.16", optional = true } rand = "0.8" smallvec = { version = "1.6", features = ["union"] } -sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "6a54d27d3b75a04b9f9cbe309a83078aa54b32fd" } +sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "a593b14adc8cda9a95952fe5a09b038ba94d6f8b" } tempfile = "3" tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync", "fs", "parking_lot"] } tokio-stream = "0.1" diff --git a/datafusion/core/src/sql/planner.rs b/datafusion/core/src/sql/planner.rs index 1c0402f631c04..7c0da7b10e573 100644 --- a/datafusion/core/src/sql/planner.rs +++ b/datafusion/core/src/sql/planner.rs @@ -2405,10 +2405,11 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> { SQLExpr::Subquery(q) => self.subquery_to_plan(q, SubqueryType::Scalar, schema), - SQLExpr::DotExpr { expr, field } => { + SQLExpr::CompositeAccess { expr, key } => { Ok(Expr::GetIndexedField { expr: Box::new(self.sql_expr_to_logical_expr(*expr, schema)?), - key: Box::new(Expr::Literal(ScalarValue::Utf8(Some(field.value)))), + // TODO this is incomplete + key: Box::new(Expr::Literal(ScalarValue::Utf8(Some(key.value)))), }) }, SQLExpr::AnyAllSubquery(q) => self.subquery_to_plan(q, SubqueryType::AnyAll, schema), diff --git a/datafusion/expr/Cargo.toml b/datafusion/expr/Cargo.toml index bceb80c090858..f525f5fa0955c 100644 --- a/datafusion/expr/Cargo.toml +++ b/datafusion/expr/Cargo.toml @@ -38,4 +38,4 @@ path = "src/lib.rs" ahash = { version = "0.7", default-features = false } arrow = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "a03d4eef5640e05dddf99fc2357ad6d58b5337cb", features = ["prettyprint"] } datafusion-common = { path = "../common", version = "7.0.0" } -sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "6a54d27d3b75a04b9f9cbe309a83078aa54b32fd" } +sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "a593b14adc8cda9a95952fe5a09b038ba94d6f8b" }