This is an automated email from the ASF dual-hosted git repository.
agrove pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-ballista.git
The following commit(s) were added to refs/heads/master by this push:
new c943e006 Replace function `from_proto_binary_op` from upstream (#298)
c943e006 is described below
commit c943e006307a18b5bc356dc5e9ca9c7bb6769494
Author: askoa <[email protected]>
AuthorDate: Fri Sep 30 17:43:02 2022 -0400
Replace function `from_proto_binary_op` from upstream (#298)
---
ballista/rust/core/src/serde/mod.rs | 36 +---------------------
.../core/src/serde/physical_plan/from_proto.rs | 3 +-
2 files changed, 3 insertions(+), 36 deletions(-)
diff --git a/ballista/rust/core/src/serde/mod.rs
b/ballista/rust/core/src/serde/mod.rs
index e8cf965b..3576d727 100644
--- a/ballista/rust/core/src/serde/mod.rs
+++ b/ballista/rust/core/src/serde/mod.rs
@@ -21,7 +21,7 @@
use crate::{error::BallistaError, serde::scheduler::Action as BallistaAction};
use arrow_flight::sql::ProstMessageExt;
use datafusion::execution::runtime_env::RuntimeEnv;
-use datafusion::logical_plan::{FunctionRegistry, Operator};
+use datafusion::logical_plan::FunctionRegistry;
use datafusion::physical_plan::join_utils::JoinSide;
use datafusion::physical_plan::ExecutionPlan;
use datafusion_proto::logical_plan::{
@@ -209,40 +209,6 @@ macro_rules! convert_box_required {
}};
}
-pub(crate) fn from_proto_binary_op(op: &str) -> Result<Operator,
BallistaError> {
- match op {
- "And" => Ok(Operator::And),
- "Or" => Ok(Operator::Or),
- "Eq" => Ok(Operator::Eq),
- "NotEq" => Ok(Operator::NotEq),
- "LtEq" => Ok(Operator::LtEq),
- "Lt" => Ok(Operator::Lt),
- "Gt" => Ok(Operator::Gt),
- "GtEq" => Ok(Operator::GtEq),
- "Plus" => Ok(Operator::Plus),
- "Minus" => Ok(Operator::Minus),
- "Multiply" => Ok(Operator::Multiply),
- "Divide" => Ok(Operator::Divide),
- "Modulo" => Ok(Operator::Modulo),
- "Like" => Ok(Operator::Like),
- "NotLike" => Ok(Operator::NotLike),
- "IsDistinctFrom" => Ok(Operator::IsDistinctFrom),
- "IsNotDistinctFrom" => Ok(Operator::IsNotDistinctFrom),
- "BitwiseAnd" => Ok(Operator::BitwiseAnd),
- "BitwiseOr" => Ok(Operator::BitwiseOr),
- "BitwiseShiftLeft" => Ok(Operator::BitwiseShiftLeft),
- "BitwiseShiftRight" => Ok(Operator::BitwiseShiftRight),
- "RegexIMatch" => Ok(Operator::RegexIMatch),
- "RegexMatch" => Ok(Operator::RegexMatch),
- "RegexNotIMatch" => Ok(Operator::RegexNotIMatch),
- "RegexNotMatch" => Ok(Operator::RegexNotMatch),
- "StringConcat" => Ok(Operator::StringConcat),
- other => Err(proto_error(format!(
- "Unsupported binary operator '{:?}'",
- other
- ))),
- }
-}
impl From<protobuf::JoinSide> for JoinSide {
fn from(t: protobuf::JoinSide) -> Self {
match t {
diff --git a/ballista/rust/core/src/serde/physical_plan/from_proto.rs
b/ballista/rust/core/src/serde/physical_plan/from_proto.rs
index af52f3d2..1e451adb 100644
--- a/ballista/rust/core/src/serde/physical_plan/from_proto.rs
+++ b/ballista/rust/core/src/serde/physical_plan/from_proto.rs
@@ -39,6 +39,7 @@ use datafusion::physical_plan::{
functions, Partitioning,
};
use datafusion::physical_plan::{ColumnStatistics, PhysicalExpr, Statistics};
+use datafusion_proto::from_proto::from_proto_binary_op;
use object_store::path::Path;
use object_store::ObjectMeta;
@@ -46,7 +47,7 @@ use crate::serde::protobuf::physical_expr_node::ExprType;
use crate::convert_required;
use crate::error::BallistaError;
-use crate::serde::{from_proto_binary_op, proto_error, protobuf};
+use crate::serde::{proto_error, protobuf};
impl From<&protobuf::PhysicalColumn> for Column {
fn from(c: &protobuf::PhysicalColumn) -> Column {