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

Function FirstLastInit

cpp/src/arrow/compute/kernels/aggregate_basic.cc:453–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451// FirstLast implementation
452
453Result<std::unique_ptr<KernelState>> FirstLastInit(KernelContext* ctx,
454 const KernelInitArgs& args) {
455 ARROW_ASSIGN_OR_RAISE(TypeHolder out_type,
456 args.kernel->signature->out_type().Resolve(ctx, args.inputs));
457
458 FirstLastInitState visitor(ctx, *args.inputs[0], out_type.GetSharedPtr(),
459 static_cast<const ScalarAggregateOptions&>(*args.options));
460 return visitor.Create();
461}
462
463// For "first" and "last" functions: override finalize and return the actual value
464template <FirstOrLast first_or_last>

Callers

nothing calls this directly

Calls 1

CreateMethod · 0.45

Tested by

no test coverage detected