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

Method AddField

cpp/src/arrow/type.cc:1420–1426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1418}
1419
1420Result<std::shared_ptr<StructType>> StructType::AddField(
1421 int i, const std::shared_ptr<Field>& field) const {
1422 if (i < 0 || i > this->num_fields()) {
1423 return Status::Invalid("Invalid column index to add field.");
1424 }
1425 return std::make_shared<StructType>(internal::AddVectorElement(children_, i, field));
1426}
1427
1428Result<std::shared_ptr<StructType>> StructType::RemoveField(int i) const {
1429 if (i < 0 || i >= this->num_fields()) {

Callers 4

garrow_schema_add_fieldFunction · 0.45
TESTFunction · 0.45
type_test.ccFile · 0.45
Schema__AddFieldFunction · 0.45

Calls 3

num_fieldsMethod · 0.95
AddVectorElementFunction · 0.85
InvalidFunction · 0.70

Tested by 1

TESTFunction · 0.36