diff --git a/datafusion/physical-expr/src/expressions/binary/kernels.rs b/datafusion/physical-expr/src/expressions/binary/kernels.rs index 1f9cfed1a44f..c0685c6decde 100644 --- a/datafusion/physical-expr/src/expressions/binary/kernels.rs +++ b/datafusion/physical-expr/src/expressions/binary/kernels.rs @@ -24,7 +24,7 @@ use arrow::compute::kernels::bitwise::{ bitwise_xor, bitwise_xor_scalar, }; use arrow::datatypes::DataType; -use datafusion_common::internal_err; +use datafusion_common::plan_err; use datafusion_common::{Result, ScalarValue}; use arrow_schema::ArrowError; @@ -70,7 +70,7 @@ macro_rules! create_dyn_kernel { DataType::UInt64 => { call_bitwise_kernel!(left, right, $KERNEL, UInt64Array) } - other => internal_err!( + other => plan_err!( "Data type {:?} not supported for binary operation '{}' on dyn arrays", other, stringify!($KERNEL) @@ -116,7 +116,7 @@ macro_rules! create_dyn_scalar_kernel { DataType::UInt16 => call_bitwise_scalar_kernel!(array, scalar, $KERNEL, UInt16Array, u16), DataType::UInt32 => call_bitwise_scalar_kernel!(array, scalar, $KERNEL, UInt32Array, u32), DataType::UInt64 => call_bitwise_scalar_kernel!(array, scalar, $KERNEL, UInt64Array, u64), - other => internal_err!( + other => plan_err!( "Data type {:?} not supported for binary operation '{}' on dyn arrays", other, stringify!($KERNEL)