| 824 | |
| 825 | template <template <class> class Functor, template <class> class ChunkedFunctor> |
| 826 | void RegisterVectorFunction(FunctionRegistry* registry, |
| 827 | std::shared_ptr<VectorFunction> func) { |
| 828 | auto add_primitive_kernel = [&](detail::GetTypeId get_id) { |
| 829 | AddKernel( |
| 830 | get_id.id, Functor<FixedSizeBinaryType>::GetSignature(get_id), |
| 831 | GenerateTypeAgnosticPrimitive<Functor, ArrayKernelExec>(get_id), |
| 832 | GenerateTypeAgnosticPrimitive<ChunkedFunctor, VectorKernel::ChunkedExec>(get_id), |
| 833 | registry, func.get()); |
| 834 | }; |
| 835 | for (const auto& ty : NumericTypes()) { |
| 836 | add_primitive_kernel(ty); |
| 837 | } |
| 838 | for (const auto& ty : TemporalTypes()) { |
| 839 | add_primitive_kernel(ty); |
| 840 | } |
| 841 | for (const auto& ty : IntervalTypes()) { |
| 842 | add_primitive_kernel(ty); |
| 843 | } |
| 844 | add_primitive_kernel(null()); |
| 845 | add_primitive_kernel(boolean()); |
| 846 | add_primitive_kernel(float16()); |
| 847 | AddKernel(Type::FIXED_SIZE_BINARY, |
| 848 | Functor<FixedSizeBinaryType>::GetSignature(Type::FIXED_SIZE_BINARY), |
| 849 | Functor<FixedSizeBinaryType>::Exec, ChunkedFunctor<FixedSizeBinaryType>::Exec, |
| 850 | registry, func.get()); |
| 851 | AddKernel(Type::DECIMAL128, |
| 852 | Functor<FixedSizeBinaryType>::GetSignature(Type::DECIMAL128), |
| 853 | Functor<FixedSizeBinaryType>::Exec, ChunkedFunctor<FixedSizeBinaryType>::Exec, |
| 854 | registry, func.get()); |
| 855 | AddKernel(Type::DECIMAL256, |
| 856 | Functor<FixedSizeBinaryType>::GetSignature(Type::DECIMAL256), |
| 857 | Functor<FixedSizeBinaryType>::Exec, ChunkedFunctor<FixedSizeBinaryType>::Exec, |
| 858 | registry, func.get()); |
| 859 | for (const auto& ty : BaseBinaryTypes()) { |
| 860 | AddKernel( |
| 861 | ty->id(), Functor<FixedSizeBinaryType>::GetSignature(ty->id()), |
| 862 | GenerateTypeAgnosticVarBinaryBase<Functor, ArrayKernelExec>(*ty), |
| 863 | GenerateTypeAgnosticVarBinaryBase<ChunkedFunctor, VectorKernel::ChunkedExec>(*ty), |
| 864 | registry, func.get()); |
| 865 | } |
| 866 | // TODO: list types |
| 867 | DCHECK_OK(registry->AddFunction(std::move(func))); |
| 868 | |
| 869 | // TODO(ARROW-9431): "replace_with_indices" |
| 870 | } |
| 871 | |
| 872 | } // namespace |
| 873 |
nothing calls this directly
no test coverage detected