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/04/23 07:48:49 UTC

[GitHub] [arrow-datafusion] viirya commented on a diff in pull request #6069: Remove temporal to kernels_arrow

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


##########
datafusion/physical-expr/src/expressions/datetime.rs:
##########
@@ -151,13 +143,18 @@ impl PhysicalExpr for DateTimeIntervalExpr {
                     operand_lhs.sub(&operand_rhs)?
                 }))
             }
-            (ColumnarValue::Array(array_lhs), ColumnarValue::Scalar(operand_rhs)) => {
-                evaluate_temporal_array(array_lhs, sign, &operand_rhs)
-            }
-
-            (ColumnarValue::Array(array_lhs), ColumnarValue::Array(array_rhs)) => {
-                evaluate_temporal_arrays(&array_lhs, sign, &array_rhs)
+            // This function evaluates temporal array vs scalar operations, such as timestamp - timestamp,
+            // interval + interval, timestamp + interval, and interval + timestamp. It takes two arrays as input
+            // and an integer sign representing the operation (+1 for addition and -1 for subtraction).

Review Comment:
   ```suggestion
               // interval + interval, timestamp + interval, and interval + timestamp. It takes one array and one scalar as input
               // and an integer sign representing the operation (+1 for addition and -1 for subtraction).
   ```



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