Skip to content

Commit

Permalink
Use compute_op_dyn_scalar for datatime
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Feb 28, 2023
1 parent 25b4f67 commit 659669f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions datafusion/physical-expr/src/expressions/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -984,16 +984,16 @@ macro_rules! binary_array_op_dyn_scalar {
ScalarValue::UInt64(v) => compute_op_dyn_scalar!($LEFT, v, $OP, $OP_TYPE),
ScalarValue::Float32(v) => compute_op_dyn_scalar!($LEFT, v, $OP, $OP_TYPE),
ScalarValue::Float64(v) => compute_op_dyn_scalar!($LEFT, v, $OP, $OP_TYPE),
ScalarValue::Date32(_) => compute_op_scalar!($LEFT, right, $OP, Date32Array),
ScalarValue::Date64(_) => compute_op_scalar!($LEFT, right, $OP, Date64Array),
ScalarValue::Time32Second(_) => compute_op_scalar!($LEFT, right, $OP, Time32SecondArray),
ScalarValue::Time32Millisecond(_) => compute_op_scalar!($LEFT, right, $OP, Time32MillisecondArray),
ScalarValue::Time64Microsecond(_) => compute_op_scalar!($LEFT, right, $OP, Time64MicrosecondArray),
ScalarValue::Time64Nanosecond(_) => compute_op_scalar!($LEFT, right, $OP, Time64NanosecondArray),
ScalarValue::TimestampSecond(..) => compute_op_scalar!($LEFT, right, $OP, TimestampSecondArray),
ScalarValue::TimestampMillisecond(..) => compute_op_scalar!($LEFT, right, $OP, TimestampMillisecondArray),
ScalarValue::TimestampMicrosecond(..) => compute_op_scalar!($LEFT, right, $OP, TimestampMicrosecondArray),
ScalarValue::TimestampNanosecond(..) => compute_op_scalar!($LEFT, right, $OP, TimestampNanosecondArray),
ScalarValue::Date32(_) => compute_op_dyn_scalar!($LEFT, v, $OP, $OP_TYPE),
ScalarValue::Date64(_) => compute_op_dyn_scalar!($LEFT, v, $OP, $OP_TYPE),
ScalarValue::Time32Second(_) => compute_op_dyn_scalar!($LEFT, v, $OP, $OP_TYPE),
ScalarValue::Time32Millisecond(_) => compute_op_dyn_scalar!($LEFT, v, $OP, $OP_TYPE),
ScalarValue::Time64Microsecond(_) => compute_op_dyn_scalar!($LEFT, v, $OP, $OP_TYPE),
ScalarValue::Time64Nanosecond(_) => compute_op_dyn_scalar!($LEFT, v, $OP, $OP_TYPE),
ScalarValue::TimestampSecond(..) => compute_op_dyn_scalar!($LEFT, v, $OP, $OP_TYPE),
ScalarValue::TimestampMillisecond(..) => compute_op_dyn_scalar!($LEFT, v, $OP, $OP_TYPE),
ScalarValue::TimestampMicrosecond(..) => compute_op_dyn_scalar!($LEFT, v, $OP, $OP_TYPE),
ScalarValue::TimestampNanosecond(..) => compute_op_dyn_scalar!($LEFT, v, $OP, $OP_TYPE),
other => Err(DataFusionError::Internal(format!(
"Data type {:?} not supported for scalar operation '{}' on dyn array",
other, stringify!($OP)))
Expand Down

0 comments on commit 659669f

Please sign in to comment.