Skip to content

Commit 59a2174

Browse files
committed
1 parent f544f7e commit 59a2174

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

datafusion-cli/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion/common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ cranelift-module = { version = "0.82.0", optional = true }
4444
ordered-float = "2.10"
4545
parquet = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "0a23deccf4e589768177fbaa7a3745c8b25f63c9", features = ["arrow"], optional = true }
4646
pyo3 = { version = "0.16", optional = true }
47-
sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "ef389d81a7b787b424a43177e2e9d7ad8be3e6c5" }
47+
sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "2b18e22a179770f1297896d52ae384f00949ab2a" }

datafusion/core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pin-project-lite= "^0.2.7"
7979
pyo3 = { version = "0.16", optional = true }
8080
rand = "0.8"
8181
smallvec = { version = "1.6", features = ["union"] }
82-
sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "ef389d81a7b787b424a43177e2e9d7ad8be3e6c5" }
82+
sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "2b18e22a179770f1297896d52ae384f00949ab2a" }
8383
tempfile = "3"
8484
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync", "fs", "parking_lot"] }
8585
tokio-stream = "0.1"

datafusion/core/src/sql/planner.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,6 +1714,21 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
17141714
self.sql_expr_to_logical_expr(*expr, schema)?,
17151715
],
17161716
}),
1717+
/* CubeSQL */
1718+
SQLExpr::Position { expr, r#in } => {
1719+
let args = vec![
1720+
FunctionArg::Unnamed(FunctionArgExpr::Expr(*expr)),
1721+
FunctionArg::Unnamed(FunctionArgExpr::Expr(*r#in)),
1722+
];
1723+
match self.schema_provider.get_function_meta("position") {
1724+
Some(fm) => {
1725+
let args = self.function_args_to_expr(args, schema)?;
1726+
1727+
Ok(Expr::ScalarUDF { fun: fm, args })
1728+
}
1729+
_ => Err(DataFusionError::Plan("Invalid function 'position'".to_string()))
1730+
}
1731+
},
17171732

17181733
SQLExpr::Value(Value::Interval {
17191734
value,

datafusion/expr/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ path = "src/lib.rs"
3838
ahash = { version = "0.7", default-features = false }
3939
arrow = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "0a23deccf4e589768177fbaa7a3745c8b25f63c9", features = ["prettyprint"] }
4040
datafusion-common = { path = "../common", version = "7.0.0" }
41-
sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "ef389d81a7b787b424a43177e2e9d7ad8be3e6c5" }
41+
sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "2b18e22a179770f1297896d52ae384f00949ab2a" }

0 commit comments

Comments
 (0)