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