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

Adds Take Impl for GeometryArray #986

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BlakeOrth
Copy link

  • Implements the Take trait for GeometryArray
  • Adds GeometryArray as a valid type for NativeArray's Take Impl

closes #985

@BlakeOrth BlakeOrth force-pushed the geometry_array_take branch from dba836c to ff73443 Compare January 31, 2025 17:51
 - Implements the Take trait for GeometryArray
 - Adds GeometryArray as a valid type for NativeArray's Take Impl
@kylebarron
Copy link
Member

Thanks for the PR!

Since originally implementing the Take here, I learned about the upstream take, which is doing basically the same thing as we do here.

I'm happy to merge this provisionally, but I'm thinking that we may either want to remove our own Take implementation or change it to be just a wrapper around the upstream arrow::compute::take, where our wrapper maintains the extension type information.

What do you think?

@BlakeOrth
Copy link
Author

I think relying on the upstream's take in some way is a great approach. My initial thought is that providing a wrapper that preserves the type information should be a relatively low lift from a code/maintenance standpoint, but it provides better ergonomics when using geoarrow. I suppose as of right now there's nothing inhibiting users from leveraging the upstream implementation and performing the type conversion on their own (I didn't even think to use that approach before authoring this PR). I can also see a good argument that geoarrow should not be duplicating functionality in arrow::compute because that can lead to disparate APIs like we already have here.

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

Successfully merging this pull request may close these issues.

geoarrow::array::GeometryArray is missing Take implementation
2 participants