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

Method AppendScalar

cpp/src/arrow/array/builder_base.cc:319–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317} // namespace
318
319Status ArrayBuilder::AppendScalar(const Scalar& scalar, int64_t n_repeats) {
320 if (!scalar.type->Equals(type())) {
321 return Status::Invalid("Cannot append scalar of type ", scalar.type->ToString(),
322 " to builder for type ", type()->ToString());
323 }
324 return AppendScalarImpl<const Scalar*>{&scalar, &scalar + 1, n_repeats, this}.Convert();
325}
326
327Status ArrayBuilder::AppendScalars(const ScalarVector& scalars) {
328 if (scalars.empty()) return Status::OK();

Callers 15

FinalizeMethod · 0.45
AppendMethod · 0.45
AppendMethod · 0.45
AppendMethod · 0.45
AppendMethod · 0.45
AppendMethod · 0.45
AppendMethod · 0.45
AppendMethod · 0.45
TEST_FFunction · 0.45
AppendScalarFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45

Calls 5

typeFunction · 0.70
InvalidFunction · 0.50
EqualsMethod · 0.45
ToStringMethod · 0.45
ConvertMethod · 0.45

Tested by 7

TEST_FFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
BuildZeroPrimitiveArrayFunction · 0.36
TEST_FFunction · 0.36
AssertAppendScalarFunction · 0.36
TEST_PFunction · 0.36