felipecrv commented on code in PR #41971:
URL: https://github.com/apache/arrow/pull/41971#discussion_r1626780547
##########
cpp/src/arrow/compute/kernels/vector_hash.cc:
##########
@@ -698,13 +698,12 @@ void AddHashKernels(VectorFunction* func, VectorKernel
base, OutputType out_ty)
DCHECK_OK(func->AddKernel(base));
}
- // Example parametric types that we want to match only on Type::type
- auto parametric_types = {time32(TimeUnit::SECOND), time64(TimeUnit::MICRO),
- timestamp(TimeUnit::SECOND),
duration(TimeUnit::SECOND),
- fixed_size_binary(0)};
- for (const auto& ty : parametric_types) {
- base.init = GetHashInit<Action>(ty->id());
- base.signature = KernelSignature::Make({ty->id()}, out_ty);
+ // Parametric types that we want matching to be depededent only on type id
+ auto parametric_types = {Type::TIME32, Type::TIME64, Type::TIMESTAMP,
Type::DURATION,
+ Type::FIXED_SIZE_BINARY};
+ for (const auto& type_id : parametric_types) {
+ base.init = GetHashInit<Action>(type_id);
+ base.signature = KernelSignature::Make({type_id}, out_ty);
Review Comment:
I didn't mention this in the description, but it seemed like an easy win
while I was reading this code.
--
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]