From 030a2cb4c185bcfca8e2115db66ad40628b5e4ae Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Wed, 2 Feb 2022 11:27:11 -0500 Subject: [PATCH] chore: Update datafusion (#3613) * chore: Update datafusion * fix: update for latest DF API * fix: another API change * fix: clippy Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- Cargo.lock | 3 ++- datafusion/Cargo.toml | 2 +- predicate/src/rewrite.rs | 2 ++ query/src/exec/context.rs | 3 +-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6865f616ed..83ead87d0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -870,7 +870,7 @@ dependencies = [ [[package]] name = "datafusion" version = "6.0.0" -source = "git+https://github.com/apache/arrow-datafusion.git?rev=f849968057ddddccc9aa19915ef3ea56bf14d80d#f849968057ddddccc9aa19915ef3ea56bf14d80d" +source = "git+https://github.com/apache/arrow-datafusion.git?rev=e4a056f00c4c5a09bddc1d16b83f771926f7b4a9#e4a056f00c4c5a09bddc1d16b83f771926f7b4a9" dependencies = [ "ahash", "arrow", @@ -882,6 +882,7 @@ dependencies = [ "log", "num_cpus", "ordered-float 2.10.0", + "parking_lot 0.11.2", "parquet", "paste", "pin-project-lite", diff --git a/datafusion/Cargo.toml b/datafusion/Cargo.toml index 6f24d0f638..b5dedc85df 100644 --- a/datafusion/Cargo.toml +++ b/datafusion/Cargo.toml @@ -9,5 +9,5 @@ description = "Re-exports datafusion at a specific version" # Rename to workaround doctest bug # Turn off optional datafusion features (e.g. don't get support for crypo functions or avro) -upstream = { git = "https://github.com/apache/arrow-datafusion.git", rev="f849968057ddddccc9aa19915ef3ea56bf14d80d", default-features = false, package = "datafusion" } +upstream = { git = "https://github.com/apache/arrow-datafusion.git", rev="e4a056f00c4c5a09bddc1d16b83f771926f7b4a9", default-features = false, package = "datafusion" } workspace-hack = { path = "../workspace-hack"} diff --git a/predicate/src/rewrite.rs b/predicate/src/rewrite.rs index 42d6e52765..2a940b02f4 100644 --- a/predicate/src/rewrite.rs +++ b/predicate/src/rewrite.rs @@ -56,6 +56,7 @@ fn is_comparison(op: Operator) -> bool { // explicitly list all of these operators so when new ones are // added to the enum we will have to update this `match` match op { + Operator::BitwiseAnd => false, Operator::Eq => true, Operator::NotEq => true, Operator::Lt => true, @@ -226,6 +227,7 @@ mod tests { #[test] fn test_fold_case_ops() { + run_case(Operator::BitwiseAnd, false, lit(1), lit(2)); run_case(Operator::Eq, true, lit("foo"), lit("bar")); run_case(Operator::NotEq, true, lit("foo"), lit("bar")); run_case(Operator::Lt, true, lit("foo"), lit("bar")); diff --git a/query/src/exec/context.rs b/query/src/exec/context.rs index 37109ddf9a..c85559815f 100644 --- a/query/src/exec/context.rs +++ b/query/src/exec/context.rs @@ -356,8 +356,7 @@ impl IOxExecutionContext { .span() .map(|span| span.child("execute_stream_partitioned")); - // TODO add a nice accessor to the Runtime from the execution context - let runtime = Arc::clone(&self.inner.state.lock().unwrap().runtime_env); + let runtime = self.inner.runtime_env(); self.run(async move { let stream = physical_plan.execute(partition, runtime).await?;