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

Function CastIntegerToInteger

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

Source from the content-addressed store, hash-verified

44namespace {
45
46Status CastIntegerToInteger(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) {
47 const auto& options = checked_cast<const CastState*>(ctx->state())->options;
48 if (!options.allow_int_overflow) {
49 RETURN_NOT_OK(IntegersCanFit(batch[0].array, *out->type()));
50 }
51 CastNumberToNumberUnsafe(batch[0].type()->id(), out->type()->id(), batch[0].array,
52 out->array_span_mutable());
53 return Status::OK();
54}
55
56Status CastFloatingToFloating(KernelContext*, const ExecSpan& batch, ExecResult* out) {
57 CastNumberToNumberUnsafe(batch[0].type()->id(), out->type()->id(), batch[0].array,

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected