Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-16659

[C++] Remove ambiguous constructor for VectorKernel

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 9.0.0
    • C++

    Description

      The VectorKernel class currently has two constructors for kernels that only a KernelSignature and an ArrayKernelExec - one with just the two arugments, and one with default argument values. 

      Trying to use them results in an ambiguous call error like this:

      /home/zagto/Code/arrow/cpp/src/arrow/compute/kernels/vector_run_length_encode.cc: In function 'void arrow::compute::internal::Register
      {{VectorRunLengthEncode(arrow::compute::FunctionRegistry*)': }}
      /home/zagto/Code/arrow/cpp/src/arrow/compute/kernels/vector_run_length_encode.cc:137:34: error: call of overloaded 'VectorKernel(std::
      shared_ptr<arrow::compute::KernelSignature>&, std::function<arrow::Status(arrow::compute::KernelContext*, const arrow::compute::ExecBa
      {{tch&, arrow::Datum*)>&)' is ambiguous }}
      {{ 137 |     VectorKernel kernel(sig, exec); }}
      {{     |                                  ^ }}
      {{In file included from /home/zagto/Code/arrow/cpp/src/arrow/compute/function.h:27, }}
      {{                from /home/zagto/Code/arrow/cpp/src/arrow/compute/api_vector.h:23, }}
      {{                from /home/zagto/Code/arrow/cpp/src/arrow/compute/kernels/vector_run_length_encode.cc:1: }}
      /home/zagto/Code/arrow/cpp/src/arrow/compute/kernel.h:616:3: note: candidate: 'arrow::compute::VectorKernel::VectorKernel(std::shared_
      {{ptr<arrow::compute::KernelSignature>, arrow::compute::ArrayKernelExec, arrow::compute::KernelInit, arrow::compute::VectorFinalize)' }}
      {{ 616 |   VectorKernel(std::shared_ptr<KernelSignature> sig, ArrayKernelExec exec, }}
      {{     |   ^~~~~~~~~~~~ }}
      /home/zagto/Code/arrow/cpp/src/arrow/compute/kernel.h:607:3: note: candidate: 'arrow::compute::VectorKernel::VectorKernel(std::shared_
      {{ptr<arrow::compute::KernelSignature>, arrow::compute::ArrayKernelExec)' }}
      {{ 607 |   VectorKernel(std::shared_ptr<KernelSignature> sig, ArrayKernelExec exec) }}
           |   ^~~~~~~~~~~~

      Attachments

        Issue Links

          Activity

            People

              zagto Tobias Zagorni
              zagto Tobias Zagorni
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h