-
Notifications
You must be signed in to change notification settings - Fork 221
Added MutableStructArray
#1196
Added MutableStructArray
#1196
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1196 +/- ##
==========================================
- Coverage 83.48% 83.31% -0.18%
==========================================
Files 356 357 +1
Lines 37081 37225 +144
==========================================
+ Hits 30957 31013 +56
- Misses 6124 6212 +88
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot, @hohav . This looks great!
I agree with that we need to expose &mut A
and request the user to extend based on their knowledge of the children's types.
I left minor comments related to performance and documentation, otherwise imo the design makes a lot of sense. 🙇
src/array/struct_/mutable.rs
Outdated
false => self.init_validity(), | ||
}, | ||
}; | ||
// TODO: investigate performance implications of this assertion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can't get away with this check :) One option we could do here is to offer a function extend_validity()
that pushes multiple items into the validity at once, in case the user can/wants to avoid this check on every call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean "can't get away without"?
I wouldn't use extend_validity
personally, but I can add it if you think it's useful.
What about adding push_unchecked
?
Would you be able to rebase against main and use the |
MutableStructArray
MutableStructArray
I rebased and updated |
Thanks a lot @hohav ! |
Very rough initial implementation of #703. Hopefully it's at least pointing in the right direction.