MCPcopy Create free account
hub / github.com/apache/arrow / DispatchBest

Method DispatchBest

cpp/src/arrow/compute/kernels/scalar_compare.cc:343–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
368struct VarArgsCompareFunction : ScalarFunction {

Callers

nothing calls this directly

Calls 12

HasDecimalFunction · 0.85
CastBinaryDecimalArgsFunction · 0.85
DispatchExactImplFunction · 0.85
EnsureDictionaryDecodedFunction · 0.85
ReplaceNullWithOtherTypeFunction · 0.85
CommonNumericFunction · 0.85
ReplaceTypesFunction · 0.85
CommonTemporalFunction · 0.85
CommonBinaryFunction · 0.85
NoMatchingKernelFunction · 0.85
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected