lidavidm commented on pull request #11573:
URL: https://github.com/apache/arrow/pull/11573#issuecomment-954947428


   This is the issue:
   
   ```diff
   diff --git a/cpp/src/arrow/compute/kernels/scalar_arithmetic.cc 
b/cpp/src/arrow/compute/kernels/scalar_arithmetic.cc
   index be6f35164..3036e2c9b 100644
   --- a/cpp/src/arrow/compute/kernels/scalar_arithmetic.cc
   +++ b/cpp/src/arrow/compute/kernels/scalar_arithmetic.cc
   @@ -1062,10 +1062,19 @@ template <>
    struct RoundOptionsWrapper<RoundToMultipleOptions>
        : public OptionsWrapper<RoundToMultipleOptions> {
      using OptionsType = RoundToMultipleOptions;
   +  using State = RoundOptionsWrapper<OptionsType>;
   +  using OptionsWrapper::OptionsWrapper;
    
      static Result<std::unique_ptr<KernelState>> Init(KernelContext* ctx,
                                                       const KernelInitArgs& 
args) {
   -    ARROW_ASSIGN_OR_RAISE(auto state, 
OptionsWrapper<OptionsType>::Init(ctx, args));
   +    std::unique_ptr<State> state;
   +    if (auto options = static_cast<const OptionsType*>(args.options)) {
   +      state = ::arrow::internal::make_unique<State>(*options);
   +    } else {
   +      return Status::Invalid(
   +          "Attempted to initialize KernelState from null FunctionOptions");
   +    }
   +
        auto options = Get(*state);
        const auto& type = *args.inputs[0].type;
        if (!options.multiple || !options.multiple->is_valid) {
   ```


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