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

Method AdjustStructBuilderLength

cpp/src/arrow/array/builder_nested.cc:166–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166Status MapBuilder::AdjustStructBuilderLength() {
167 // If key/item builders have been appended, adjust struct builder length
168 // to match. Struct and key are non-nullable, append all valid values.
169 auto struct_builder =
170 internal::checked_cast<StructBuilder*>(list_builder_->value_builder());
171 if (struct_builder->length() < key_builder_->length()) {
172 int64_t length_diff = key_builder_->length() - struct_builder->length();
173 RETURN_NOT_OK(struct_builder->AppendValues(length_diff, NULLPTR));
174 }
175 return Status::OK();
176}
177
178// ----------------------------------------------------------------------
179// FixedSizeListBuilder

Callers

nothing calls this directly

Calls 4

OKFunction · 0.50
value_builderMethod · 0.45
lengthMethod · 0.45
AppendValuesMethod · 0.45

Tested by

no test coverage detected