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

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #5194: Support arithmetic operation on DictionaryArray

alamb commented on code in PR #5194:
URL: https://github.com/apache/arrow-datafusion/pull/5194#discussion_r1097767305


##########
datafusion/physical-expr/src/expressions/binary.rs:
##########
@@ -418,6 +419,23 @@ macro_rules! binary_primitive_array_op {
     }};
 }
 
+/// Invoke a compute kernel on a pair of arrays
+/// The binary_primitive_array_op macro only evaluates for primitive types
+/// like integers and floats.
+macro_rules! binary_primitive_array_op_dyn {
+    ($LEFT:expr, $RIGHT:expr, $OP:ident) => {{
+        match $LEFT.data_type() {
+            DataType::Decimal128(_,_) => {
+                Ok(paste::expr! {[<$OP _decimal>]}(&$LEFT, &$RIGHT)?)
+                // Ok(Arc::new($OP(&$LEFT, &$RIGHT).map_err(|err| DataFusionError::ArrowError(err))?))

Review Comment:
   is this meant to be left commented out?



-- 
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