At the moment iterating over the fields produces an iterator of Result which is annoying to deal with and doesn't play very well with most other Rust iterator combinators (like map, for example)
This is a tracking issue for a conversation @scovich and I had about how to improve iterating over a VariantList / fields of a VariantObject
Something I noticed here was that it would be really nice if:
- This returned an Iterator rather than a
Result
- We could implement
iter() and IntoIterator for VariantList
That would make using it more ergonomic, though it would require either panic'ing or else validating the offsets on construction 🤔
Originally posted by @alamb in #7666 (comment)
Part of [EPIC] [Parquet] Implement Variant type support in Parquet #6736
Related to [Variant] Consider validating variants on creation (rather than read) #7684
At the moment iterating over the fields produces an iterator of
Resultwhich is annoying to deal with and doesn't play very well with most other Rust iterator combinators (like map, for example)This is a tracking issue for a conversation @scovich and I had about how to improve iterating over a VariantList / fields of a VariantObject
Something I noticed here was that it would be really nice if:
Resultiter()andIntoIteratorfor VariantListThat would make using it more ergonomic, though it would require either panic'ing or else validating the offsets on construction 🤔
Originally posted by @alamb in #7666 (comment)