pitrou commented on code in PR #41971:
URL: https://github.com/apache/arrow/pull/41971#discussion_r1629413512


##########
docs/source/cpp/compute.rst:
##########
@@ -1433,14 +1435,20 @@ null input value is converted into a null output value.
 
 * \(3) The list offsets are unchanged, the list values are cast from the
   input value type to the output value type (if a conversion is
-  available).
+  available). If the output type is (Large)ListView, then sizes are
+  derived from the offsets.
+
+* \(4) If output type is list-like, offsets might have to be rebuilt to be
+  sorted and spaced correctly. If output type is a list-view type, the offsets

Review Comment:
   The values also need to be rewritten for the views to be contiguous, right?



##########
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:
   Sounds good to me.



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

Review Comment:
   ```suggestion
     // Parametric types that we want matching to be dependent only on type id
   ```



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

Reply via email to