| 341 | using ScalarFunction::ScalarFunction; |
| 342 | |
| 343 | Result<const Kernel*> DispatchBest(std::vector<TypeHolder>* types) const override { |
| 344 | RETURN_NOT_OK(CheckArity(types->size())); |
| 345 | if (HasDecimal(*types)) { |
| 346 | RETURN_NOT_OK(CastBinaryDecimalArgs(DecimalPromotion::kAdd, types)); |
| 347 | } |
| 348 | |
| 349 | using arrow::compute::detail::DispatchExactImpl; |
| 350 | if (auto kernel = DispatchExactImpl(this, *types)) return kernel; |
| 351 | |
| 352 | EnsureDictionaryDecoded(types); |
| 353 | ReplaceNullWithOtherType(types); |
| 354 | |
| 355 | if (auto type = CommonNumeric(*types)) { |
| 356 | ReplaceTypes(type, types); |
| 357 | } else if (auto type = CommonTemporal(types->data(), types->size())) { |
| 358 | ReplaceTypes(type, types); |
| 359 | } else if (auto type = CommonBinary(types->data(), types->size())) { |
| 360 | ReplaceTypes(type, types); |
| 361 | } |
| 362 | |
| 363 | if (auto kernel = DispatchExactImpl(this, *types)) return kernel; |
| 364 | return arrow::compute::detail::NoMatchingKernel(this, *types); |
| 365 | } |
| 366 | }; |
| 367 | |
| 368 | struct VarArgsCompareFunction : ScalarFunction { |
nothing calls this directly
no test coverage detected