-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make it easier to work with metadata by providing more default behaviors #56
Conversation
Codecov ReportBase: 95.34% // Head: 96.36% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #56 +/- ##
==========================================
+ Coverage 95.34% 96.36% +1.01%
==========================================
Files 1 1
Lines 43 55 +12
==========================================
+ Hits 41 53 +12
Misses 2 2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
I think the tricky part is where that |
Yes, that is why I assume that this is not lazy. In general this dictionary would have to be freshly allocated if it were mutable - some packages, e.g. Parquet2.jl expose non-mutable dictionaries, in which case they do not need to allocate (actually both if So this would be a convenience functionality (per @nathanrboyer request). |
That makes a lot of sense. Should we have some sort of documentation that makes it clear that |
Makes sense. I also think the docs should mention that the resulting object should not be modified as it is owned by |
Also, maybe we should define a fallback |
Following the comments I have:
|
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
@ExpandingMan - can you please have a look at this PR before it is merged and released (it will have a minor in fluence on Parquet2.jl implementation, but actually it will go along what you partially have already). Thank you! |
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Looks good to me. I haven't actually tested anything against this but it looks non-breaking. |
Thank you! |
Fixes #55
Fixes #51
@Tokazama - in relation to #51 I ended up recommending to return a dictionary (not just an iterator). Do you think it would be acceptable, or you would prefer to require only an iterator of pairs?
The benefit of dictionary would be that later it is easier for users to work with it. I assume that if a given value does not have already an underlying dictionary to store metadata (most have) then just
Dict
will be used since this is a non-lazy interface.If someone wants a lazy iterator then using
metadatakeys
and then getting the required metadata is an option that is available.