fansehep commented on code in PR #4985:
URL: https://github.com/apache/arrow-rs/pull/4985#discussion_r1371141889
##########
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:
I think it's good!!! 😄
##########
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:
I think it's good!!! 😄
--
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]