-
Notifications
You must be signed in to change notification settings - Fork 11
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
don't serialize empty array metadata #498
base: main
Are you sure you want to change the base?
Conversation
hmm looks like I have some issues with the union handling :/ |
let dt = GeoDataType::Point(CoordType::Interleaved); | ||
let field = dt.to_field("field_name", true, None); | ||
assert_eq!(field.metadata().len(), 1); | ||
assert!(field.metadata().contains_key("ARROW:extension:name")); |
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 I misunderstood one of your comments about the {}
...I am pretty sure that geoarrow-c will serialize empty metadata as {}
, even though the spec says to omit the key. I do think having a canonical way to represent "no metadata" is helpful (so that non-geo-aware libraries see the schemas as equal); however, it definitely doesn't cause a problem as I might have suggested 😬
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.
Ah ok. Just the changes in #497 would change {"crs": null}
to {}
. The attempted changes in this PR would omit the key entirely from the metadata. I think we can consume either input
Supersedes #497 ; progress for #430