You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/01/12 13:46:20 UTC

[GitHub] [arrow] lidavidm commented on a change in pull request #12124: ARROW-14093: [C++] subtract(date, date) -> interval kernel

lidavidm commented on a change in pull request #12124:
URL: https://github.com/apache/arrow/pull/12124#discussion_r783086678



##########
File path: cpp/src/arrow/compute/kernels/scalar_arithmetic.cc
##########
@@ -1491,6 +1500,8 @@ ArrayKernelExec ArithmeticExecFromOp(detail::GetTypeId get_id) {
     case Type::INT64:
     case Type::TIMESTAMP:
       return KernelGenerator<Int64Type, Int64Type, Op>::Exec;
+    case Type::DATE64:
+      return KernelGenerator<Int64Type, Date64Type, Op>::Exec;

Review comment:
       Instead of adding this case here (which I think would cause the compiler to instantiate this template for all the kernel structs, even ones we don't care about), how about just writing `auto exec_date_64 = ScalarBinaryEqualTypes<...>::Exec` below?




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