Tobias Zagorni created ARROW-16659:
--------------------------------------

             Summary: [C++] Remove ambiguous constructor for VectorKernel
                 Key: ARROW-16659
                 URL: https://issues.apache.org/jira/browse/ARROW-16659
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++
            Reporter: Tobias Zagorni
            Assignee: Tobias Zagorni


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) }}
{{     |   ^~~~~~~~~~~~}}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to