| 1429 | } |
| 1430 | |
| 1431 | Result<std::shared_ptr<StructType>> StructType::RemoveField(int i) const { |
| 1432 | if (i < 0 || i >= this->num_fields()) { |
| 1433 | return Status::Invalid("Invalid column index to remove field."); |
| 1434 | } |
| 1435 | return std::make_shared<StructType>(internal::DeleteVectorElement(children_, i)); |
| 1436 | } |
| 1437 | |
| 1438 | Result<std::shared_ptr<StructType>> StructType::SetField( |
| 1439 | int i, const std::shared_ptr<Field>& field) const { |