Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Jun 27, 2024
1 parent 0232666 commit c09e299
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions datafusion/expr/src/type_coercion/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use std::collections::HashSet;
use std::sync::Arc;

use crate::Operator;
use crate::{Operator, WrapCustomOperator};

use arrow::array::{new_empty_array, Array};
use arrow::compute::can_cast_types;
Expand All @@ -29,7 +29,6 @@ use arrow::datatypes::{
DECIMAL256_MAX_PRECISION, DECIMAL256_MAX_SCALE,
};

use crate::operator::WrapCustomOperator;
use datafusion_common::{exec_datafusion_err, plan_datafusion_err, plan_err, Result};

/// The type signature of an instantiation of binary operator expression such as
Expand Down
3 changes: 2 additions & 1 deletion datafusion/sql/src/unparser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ use datafusion_common::{
use datafusion_expr::{
expr::{Alias, Exists, InList, ScalarFunction, Sort, WindowFunction},
Between, BinaryExpr, Case, Cast, Expr, GroupingSet, Like, Operator, TryCast,
WrapCustomOperator,
};

use super::Unparser;
Expand Down Expand Up @@ -649,7 +650,7 @@ impl Unparser<'_> {
Operator::BitwiseShiftRight => Ok(ast::BinaryOperator::PGBitwiseShiftRight),
Operator::BitwiseShiftLeft => Ok(ast::BinaryOperator::PGBitwiseShiftLeft),
Operator::StringConcat => Ok(ast::BinaryOperator::StringConcat),
Operator::Custom(op) => op.0.op_to_sql(),
Operator::Custom(WrapCustomOperator(op)) => op.op_to_sql(),
Operator::AtArrow => not_impl_err!("unsupported operation: {op:?}"),
Operator::ArrowAt => not_impl_err!("unsupported operation: {op:?}"),
}
Expand Down
4 changes: 2 additions & 2 deletions datafusion/substrait/src/logical_plan/producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use std::sync::Arc;
use arrow_buffer::ToByteSlice;
use datafusion::arrow::datatypes::IntervalUnit;
use datafusion::logical_expr::{
CrossJoin, Distinct, Like, Partitioning, WindowFrameUnits,
CrossJoin, Distinct, Like, Partitioning, WindowFrameUnits, WrapCustomOperator,
};
use datafusion::{
arrow::datatypes::{DataType, TimeUnit},
Expand Down Expand Up @@ -723,7 +723,7 @@ pub fn operator_to_name(op: Operator) -> &'static str {
Operator::BitwiseXor => "bitwise_xor",
Operator::BitwiseShiftRight => "bitwise_shift_right",
Operator::BitwiseShiftLeft => "bitwise_shift_left",
Operator::Custom(op) => op.0.name(),
Operator::Custom(WrapCustomOperator(op)) => op.name(),
}
}

Expand Down

0 comments on commit c09e299

Please sign in to comment.