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

Method AddField

cpp/src/arrow/type.cc:1423–1429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

garrow_schema_add_fieldFunction · 0.45
TESTFunction · 0.45
Schema__AddFieldFunction · 0.45

Calls 3

num_fieldsMethod · 0.95
AddVectorElementFunction · 0.85
InvalidFunction · 0.70

Tested by 1

TESTFunction · 0.36