Skip to content
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

Support parsing/encoding WKT and WKB from binary/text view arrays #942

Open
kylebarron opened this issue Dec 12, 2024 · 3 comments
Open

Comments

@kylebarron
Copy link
Member

No description provided.

@JosiahParry
Copy link
Contributor

I think this is an error I am encountering.

I can get a SerializedArrayDyn but trying to cast it to GeometryArray using let res = GeometryArray::try_from(serialized_array.into_array_ref().as_ref())?; results in a panic src/vendor/geoarrow/src/array/dynamic.rs:199:9: not yet implemented

@kylebarron
Copy link
Member Author

This issue is for something else. Arrow supports multiple types to store binary and string data. In particular, it has both the "traditional" binary/string array and the new "view types" binary/string arrays. See https://datafusion.apache.org/blog/2024/09/13/string-view-german-style-strings-part-1/, https://pola.rs/posts/polars-string-type/.

We currently support parsing WKT and WKB from the "traditional" types but not the new "view" types.

@kylebarron
Copy link
Member Author

results in a panic src/vendor/geoarrow/src/array/dynamic.rs:199:9: not yet implemented

I accidentally pushed it directly but I fixed that todo!() in b4ecffa.

But still, that only fixes the into_array_ref panic. GeometryArray::try_from won't work from a serialized array. It only supports zero-copy conversions, and parsing from WKT or WKB isn't a zero-copy conversion. You need to use the WKT and WKB apis to parse it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants