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

Function MakeIsInfFunction

cpp/src/arrow/compute/kernels/scalar_validity.cc:256–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256std::shared_ptr<ScalarFunction> MakeIsInfFunction(std::string name, FunctionDoc doc) {
257 auto func = std::make_shared<ScalarFunction>(name, Arity::Unary(), std::move(doc));
258
259 AddFloatValidityKernel<FloatType, IsInfOperator>(float32(), func.get());
260 AddFloatValidityKernel<DoubleType, IsInfOperator>(float64(), func.get());
261 AddFloatValidityKernel<HalfFloatType, IsInfOperator>(float16(), func.get());
262
263 for (const auto& ty : IntTypes()) {
264 DCHECK_OK(func->AddKernel({InputType(ty->id())}, boolean(), ConstBoolExec<false>));
265 }
266 DCHECK_OK(func->AddKernel({InputType(Type::NA)}, boolean(), ConstBoolExec<false>));
267 DCHECK_OK(
268 func->AddKernel({InputType(Type::DECIMAL128)}, boolean(), ConstBoolExec<false>));
269 DCHECK_OK(
270 func->AddKernel({InputType(Type::DECIMAL256)}, boolean(), ConstBoolExec<false>));
271 DCHECK_OK(
272 func->AddKernel({InputType(Type::DURATION)}, boolean(), ConstBoolExec<false>));
273 return func;
274}
275
276std::shared_ptr<ScalarFunction> MakeIsNanFunction(std::string name, FunctionDoc doc) {
277 auto func = std::make_shared<ScalarFunction>(name, Arity::Unary(), std::move(doc));

Callers 1

RegisterScalarValidityFunction · 0.85

Calls 5

UnaryFunction · 0.85
InputTypeFunction · 0.85
getMethod · 0.45
AddKernelMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected