Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sqlparser-0.21] Use released crate #3202

Merged
merged 1 commit into from
Aug 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion datafusion/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ ordered-float = "3.0"
parquet = { version = "20.0.0", features = ["arrow"], optional = true }
pyo3 = { version = "0.16", optional = true }
serde_json = "1.0"
sqlparser = { git = "https://github.com/sqlparser-rs/sqlparser-rs", rev = "42c5d43b45d3e7a573ac24dd5c927c43bbd3768c" }
sqlparser = "0.21"
2 changes: 1 addition & 1 deletion datafusion/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pyo3 = { version = "0.16", optional = true }
rand = "0.8"
rayon = { version = "1.5", optional = true }
smallvec = { version = "1.6", features = ["union"] }
sqlparser = { git = "https://github.com/sqlparser-rs/sqlparser-rs", rev = "42c5d43b45d3e7a573ac24dd5c927c43bbd3768c" }
sqlparser = "0.21"
tempfile = "3"
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync", "fs", "parking_lot"] }
tokio-stream = "0.1"
Expand Down
3 changes: 0 additions & 3 deletions datafusion/core/tests/sql/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1322,9 +1322,6 @@ async fn nested_subquery() -> Result<()> {
}

#[tokio::test]
#[ignore]
// this will be re-instated once we are using a later rev of sqlparser that has a fix for this
// regression - see https://github.com/apache/arrow-datafusion/issues/3192 for more info
async fn like_nlike_with_null_lt() {
let ctx = SessionContext::new();
let sql = "SELECT column1 like NULL as col_null, NULL like column1 as null_col from (values('a'), ('b'), (NULL)) as t";
Expand Down
2 changes: 1 addition & 1 deletion datafusion/expr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ path = "src/lib.rs"
ahash = { version = "0.8", default-features = false, features = ["runtime-rng"] }
arrow = { version = "20.0.0", features = ["prettyprint"] }
datafusion-common = { path = "../common", version = "11.0.0" }
sqlparser = { git = "https://github.com/sqlparser-rs/sqlparser-rs", rev = "42c5d43b45d3e7a573ac24dd5c927c43bbd3768c" }
sqlparser = "0.21"
2 changes: 1 addition & 1 deletion datafusion/sql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ arrow = { version = "20.0.0", features = ["prettyprint"] }
datafusion-common = { path = "../common", version = "11.0.0" }
datafusion-expr = { path = "../expr", version = "11.0.0" }
hashbrown = "0.12"
sqlparser = { git = "https://github.com/sqlparser-rs/sqlparser-rs", rev = "42c5d43b45d3e7a573ac24dd5c927c43bbd3768c" }
sqlparser = "0.21"
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync", "fs", "parking_lot"] }
7 changes: 1 addition & 6 deletions datafusion/sql/src/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1941,12 +1941,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
Ok(Expr::BinaryExpr {
left: Box::new(self.sql_expr_to_logical_expr(*expr, schema, ctes)?),
op: if negated { Operator::NotLike } else { Operator::Like },
right: match *pattern {
Value::SingleQuotedString(s) | Value::DoubleQuotedString(s) => {
Ok(Box::new(Expr::Literal(ScalarValue::Utf8(Some(s)))))
}
_ => Err(DataFusionError::NotImplemented("Unsupported syntax for LIKE pattern ".to_string()))
}?
right: Box::new(self.sql_expr_to_logical_expr(*pattern, schema, ctes)?),
})
}
}
Expand Down