tustvold commented on code in PR #4985:
URL: https://github.com/apache/arrow-rs/pull/4985#discussion_r1370415678
##########
arrow-schema/src/schema.rs:
##########
@@ -57,6 +57,17 @@ impl SchemaBuilder {
self.fields.remove(idx)
}
+ /// Change the FieldRef as index `idx`
+ /// if index out of bounds, will panic
+ pub fn change_field(&mut self, idx: usize, field: impl Into<FieldRef>) {
+ self.fields[idx] = field.into()
Review Comment:
```suggestion
/// Returns a mutable reference to the field at `idx`
pub fn field_mut(&mut self, idx: usize) -> &mut FieldRef {
&mut self.fields[idx]
```
What do you think about this instead?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]