You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2021/12/14 15:46:53 UTC
[arrow-datafusion] branch master updated: Update arrow-rs to 6.4.0 and replace boolean comparison in datafusion with arrow compute kernel (#1446)
This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/master by this push:
new e1cfa41 Update arrow-rs to 6.4.0 and replace boolean comparison in datafusion with arrow compute kernel (#1446)
e1cfa41 is described below
commit e1cfa4188d5daf4da71d0371118cd175207828c3
Author: xudong.w <wx...@gmail.com>
AuthorDate: Tue Dec 14 23:46:45 2021 +0800
Update arrow-rs to 6.4.0 and replace boolean comparison in datafusion with arrow compute kernel (#1446)
---
ballista/rust/core/Cargo.toml | 2 +-
ballista/rust/executor/Cargo.toml | 4 +--
datafusion-cli/Cargo.toml | 2 +-
datafusion-examples/Cargo.toml | 2 +-
datafusion/Cargo.toml | 4 +--
datafusion/src/physical_plan/expressions/binary.rs | 36 ++--------------------
6 files changed, 9 insertions(+), 41 deletions(-)
diff --git a/ballista/rust/core/Cargo.toml b/ballista/rust/core/Cargo.toml
index 662ced0..84679d5 100644
--- a/ballista/rust/core/Cargo.toml
+++ b/ballista/rust/core/Cargo.toml
@@ -43,7 +43,7 @@ tonic = "0.5"
uuid = { version = "0.8", features = ["v4"] }
chrono = "0.4"
-arrow-flight = { version = "6.3.0" }
+arrow-flight = { version = "6.4.0" }
datafusion = { path = "../../../datafusion", version = "6.0.0" }
diff --git a/ballista/rust/executor/Cargo.toml b/ballista/rust/executor/Cargo.toml
index 6717a0a..00f3aab 100644
--- a/ballista/rust/executor/Cargo.toml
+++ b/ballista/rust/executor/Cargo.toml
@@ -29,8 +29,8 @@ edition = "2018"
snmalloc = ["snmalloc-rs"]
[dependencies]
-arrow = { version = "6.3.0" }
-arrow-flight = { version = "6.3.0" }
+arrow = { version = "6.4.0" }
+arrow-flight = { version = "6.4.0" }
anyhow = "1"
async-trait = "0.1.36"
ballista-core = { path = "../core", version = "0.6.0" }
diff --git a/datafusion-cli/Cargo.toml b/datafusion-cli/Cargo.toml
index 2722750..394bd1e 100644
--- a/datafusion-cli/Cargo.toml
+++ b/datafusion-cli/Cargo.toml
@@ -31,5 +31,5 @@ clap = "2.33"
rustyline = "9.0"
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync"] }
datafusion = { path = "../datafusion", version = "6.0.0" }
-arrow = { version = "6.3.0" }
+arrow = { version = "6.4.0" }
ballista = { path = "../ballista/rust/client", version = "0.6.0" }
diff --git a/datafusion-examples/Cargo.toml b/datafusion-examples/Cargo.toml
index d81100f..f7ef66d 100644
--- a/datafusion-examples/Cargo.toml
+++ b/datafusion-examples/Cargo.toml
@@ -34,7 +34,7 @@ path = "examples/avro_sql.rs"
required-features = ["datafusion/avro"]
[dev-dependencies]
-arrow-flight = { version = "6.3.0" }
+arrow-flight = { version = "6.4.0" }
datafusion = { path = "../datafusion" }
prost = "0.8"
tonic = "0.5"
diff --git a/datafusion/Cargo.toml b/datafusion/Cargo.toml
index a8c075e..fadc9ab 100644
--- a/datafusion/Cargo.toml
+++ b/datafusion/Cargo.toml
@@ -52,8 +52,8 @@ avro = ["avro-rs", "num-traits"]
[dependencies]
ahash = "0.7"
hashbrown = { version = "0.11", features = ["raw"] }
-arrow = { version = "6.3.0", features = ["prettyprint"] }
-parquet = { version = "6.3.0", features = ["arrow"] }
+arrow = { version = "6.4.0", features = ["prettyprint"] }
+parquet = { version = "6.4.0", features = ["arrow"] }
sqlparser = "0.13"
paste = "^1.0"
num_cpus = "1.13.0"
diff --git a/datafusion/src/physical_plan/expressions/binary.rs b/datafusion/src/physical_plan/expressions/binary.rs
index 92d2a8b..d8bae7d 100644
--- a/datafusion/src/physical_plan/expressions/binary.rs
+++ b/datafusion/src/physical_plan/expressions/binary.rs
@@ -25,8 +25,8 @@ use arrow::compute::kernels::arithmetic::{
use arrow::compute::kernels::boolean::{and_kleene, not, or_kleene};
use arrow::compute::kernels::comparison::{eq, gt, gt_eq, lt, lt_eq, neq};
use arrow::compute::kernels::comparison::{
- eq_bool, eq_bool_scalar, gt_bool, gt_eq_bool, lt_bool, lt_eq_bool, neq_bool,
- neq_bool_scalar,
+ eq_bool, eq_bool_scalar, gt_bool, gt_bool_scalar, gt_eq_bool, gt_eq_bool_scalar,
+ lt_bool, lt_bool_scalar, lt_eq_bool, lt_eq_bool_scalar, neq_bool, neq_bool_scalar,
};
use arrow::compute::kernels::comparison::{
eq_scalar, gt_eq_scalar, gt_scalar, lt_eq_scalar, lt_scalar, neq_scalar,
@@ -79,38 +79,6 @@ fn is_not_distinct_from_bool(
.collect())
}
-// TODO use arrow-rs kernels when available. See
-// https://github.com/apache/arrow-rs/issues/959
-#[allow(clippy::bool_comparison)]
-fn lt_bool_scalar(left: &BooleanArray, right: bool) -> Result<BooleanArray> {
- Ok(left
- .iter()
- .map(|left| left.map(|left| left < right))
- .collect())
-}
-
-fn lt_eq_bool_scalar(left: &BooleanArray, right: bool) -> Result<BooleanArray> {
- Ok(left
- .iter()
- .map(|left| left.map(|left| left <= right))
- .collect())
-}
-
-#[allow(clippy::bool_comparison)]
-fn gt_bool_scalar(left: &BooleanArray, right: bool) -> Result<BooleanArray> {
- Ok(left
- .iter()
- .map(|left| left.map(|left| left > right))
- .collect())
-}
-
-fn gt_eq_bool_scalar(left: &BooleanArray, right: bool) -> Result<BooleanArray> {
- Ok(left
- .iter()
- .map(|left| left.map(|left| left >= right))
- .collect())
-}
-
/// Binary expression
#[derive(Debug)]
pub struct BinaryExpr {