lidavidm commented on a change in pull request #11218:
URL: https://github.com/apache/arrow/pull/11218#discussion_r719479881
##########
File path: cpp/src/arrow/compute/kernels/scalar_if_else.cc
##########
@@ -1031,7 +1183,16 @@ void AddPrimitiveIfElseKernels(const
std::shared_ptr<ScalarFunction>& scalar_fun
internal::GenerateTypeAgnosticPrimitive<ResolveIfElseExec,
/*AllocateMem=*/std::false_type>(*type);
// cond array needs to be boolean always
- ScalarKernel kernel({boolean(), type, type}, type, exec);
+ std::shared_ptr<KernelSignature> sig;
+ if (type->id() == Type::TIMESTAMP) {
+ auto unit = checked_cast<const TimestampType&>(*type).unit();
+ sig = KernelSignature::Make(
+ {boolean(), match::TimestampTypeUnit(unit),
match::TimestampTypeUnit(unit)},
Review comment:
Ah, the match here is because otherwise, the kernel for `timestamp[s]`
doesn't match `timestamp[s, tz=...]` since the check is exact.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]