Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] Remove ambiguous constructor for VectorKernel #20260

Closed
asfimport opened this issue May 25, 2022 · 1 comment
Closed

[C++] Remove ambiguous constructor for VectorKernel #20260

asfimport opened this issue May 25, 2022 · 1 comment

Comments

@asfimport
Copy link

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

Reporter: Tobias Zagorni / @zagto
Assignee: Tobias Zagorni / @zagto

PRs and other links:

Note: This issue was originally created as ARROW-16659. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Weston Pace / @westonpace:
Issue resolved by pull request 13235
#13235

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant