You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "viirya (via GitHub)" <gi...@apache.org> on 2023/02/02 19:15:27 UTC

[GitHub] [arrow-datafusion] viirya commented on a diff in pull request #5151: Support arithmetic scalar operation with DictionaryArray

viirya commented on code in PR #5151:
URL: https://github.com/apache/arrow-datafusion/pull/5151#discussion_r1094969189


##########
datafusion/physical-expr/src/expressions/binary.rs:
##########
@@ -924,18 +998,39 @@ impl BinaryExpr {
                 binary_array_op_dyn_scalar!(array, scalar.clone(), neq, bool_type)
             }
             Operator::Plus => {
-                binary_primitive_array_op_scalar!(array, scalar.clone(), add)
+                binary_primitive_array_op_dyn_scalar!(
+                    array,
+                    scalar.clone(),
+                    add,
+                    left_type
+                )
             }
             Operator::Minus => {
-                binary_primitive_array_op_scalar!(array, scalar.clone(), subtract)
+                binary_primitive_array_op_dyn_scalar!(
+                    array,
+                    scalar.clone(),
+                    subtract,
+                    left_type
+                )
             }
             Operator::Multiply => {
-                binary_primitive_array_op_scalar!(array, scalar.clone(), multiply)
+                binary_primitive_array_op_dyn_scalar!(
+                    array,
+                    scalar.clone(),
+                    multiply,
+                    left_type
+                )
             }
             Operator::Divide => {
-                binary_primitive_array_op_scalar!(array, scalar.clone(), divide)
+                binary_primitive_array_op_dyn_scalar!(
+                    array,
+                    scalar.clone(),
+                    divide,
+                    left_type
+                )
             }
             Operator::Modulo => {
+                // todo: change to binary_primitive_array_op_dyn_scalar! once modulo is implemented

Review Comment:
   modulo change: https://github.com/apache/arrow-rs/pull/3649



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org