amoeba commented on code in PR #46286:
URL: https://github.com/apache/arrow/pull/46286#discussion_r2070947199


##########
cpp/src/arrow/compute/kernels/vector_run_end_encode.cc:
##########
@@ -572,8 +582,9 @@ void RegisterVectorRunEndEncode(FunctionRegistry* registry) 
{
   for (const auto& ty : IntervalTypes()) {
     add_kernel(ty->id());
   }
-  add_kernel(Type::DECIMAL128);
-  add_kernel(Type::DECIMAL256);
+  for (const auto& type_id : DecimalTypeIds()) {
+    add_kernel(type_id);
+  }

Review Comment:
   For reviewers: I wasn't sure why this is `DecimalTypeIds` instead of 
`DecimalTypes` (the name and return type is different). Happy to include this 
and related changes in this PR unless there's some reason we can't or shouldn't:
   
   ```patch
   diff --git i/cpp/src/arrow/type.h w/cpp/src/arrow/type.h
   index 0dd1d56c65..0f7688ae1f 100644
   --- i/cpp/src/arrow/type.h
   +++ w/cpp/src/arrow/type.h
   @@ -2629,9 +2629,8 @@ const std::vector<std::shared_ptr<DataType>>& 
DurationTypes();
    /// \brief Numeric, base binary, date, boolean and null types
    ARROW_EXPORT
    const std::vector<std::shared_ptr<DataType>>& PrimitiveTypes();
   -
   -/// \brief Decimal type ids
   +/// \brief Decimal types
    ARROW_EXPORT
   -const std::vector<Type::type>& DecimalTypeIds();
   +const std::vector<std::shared_ptr<DataType>>& DecimalTypes();
   
    }  // namespace arrow
   ```
   
   Any ideas @pitrou ?



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