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

Function CastIntegerToFloating

cpp/src/arrow/compute/kernels/scalar_cast_numeric.cc:270–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270Status CastIntegerToFloating(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) {
271 const auto& options = checked_cast<const CastState*>(ctx->state())->options;
272 Type::type out_type = out->type()->id();
273 if (!options.allow_float_truncate) {
274 RETURN_NOT_OK(CheckForIntegerToFloatingTruncation(batch[0], out_type));
275 }
276 CastNumberToNumberUnsafe(batch[0].type()->id(), out_type, batch[0].array,
277 out->array_span_mutable());
278 return Status::OK();
279}
280
281} // namespace
282

Callers

nothing calls this directly

Calls 6

CastNumberToNumberUnsafeFunction · 0.85
OKFunction · 0.50
stateMethod · 0.45
idMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected