Conversation
|
BTW while this is technically an API change and should wait for the next major release, I think it is important enough to merge for 57.2.0 (a minor release) and will not be disruptive (as I don't think anyone has implemented this) I had a brief look around geoarrow as it is well designed in my opinion and a non trivial extension on top of I didn't see any |
kylebarron
left a comment
There was a problem hiding this comment.
I tried to implement Array for external types but was never able to get the downcasting working because of the closed nature of DataType. So I don't think it was previously possible to implement Array externally: sealing the array just makes it explicit
|
Such a same getting this trait sealed. I was finding it very convenient for implementing a GPU-based |
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
|
I presume you're referring to https://github.com/gabotechs/libcudf-rs/blob/main/src/column_view.rs#L125 If so why not just define your own trait, it looks like you're only using a very limited subset of Array anyway, and passing that array into any arrow-rs kernel will cause it at best panic (as downcast won't work correctly). |
|
@tustvold It's mainly for wiring it up with https://github.com/apache/datafusion. As DataFusion moves Not saying that the change in this PR does not make sense though, I believe it does, but I wonder what could be the alternative. Maybe letting DataFusion be the one that exposes a customizable trait for transporting data? |
When implementing the variant extension type, we also tried to use So the Aside: the same 1:1 constrait is also why |
Could it pass |
|
I am expecting an issue shortly for this PR, and then I think we should merge it to avoid confusion. I realize this will cause @gabotechs some pain downstream, but let's figure out a better API for backing arrays with GPU memory as a follow on |
gabotechs
left a comment
There was a problem hiding this comment.
Could it pass ArrayData instead? Should be easy enough to do e.g. StructArray::from(record_batch).into_data() and then RecordBatch::from(StructArray::from(array_data))?
Yeah, I think I can do either this or something similar, thanks for the options! this change makes sense to me 👍
|
Thanks again for everyone's thoughts. Also thanks to @shinmao for the report |
|
Another one Despite whether this impl is reasonable, or has a better alternative, |
|
@waynexia I believe the concern and speed was related to the soundness report here Given your usecase I believe we should find some other way to sort this out. I filed a ticket to discuss the idea here I am happy to run another arrow release on the 57 line to resolve this issue once we have consensus |
This reverts commit 721f373.
This reverts commit 721f373. # Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. --> - Discussed in #9184 - Closes #9184 # Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> As discussed in Discussed in #9184, rather than sealing the `Array` trait, it's going to potentially be marked `unsafe` so that projects have time to find alternatives for their use-cases that are now satisfied by a custom `Array` implementation. # What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> Clean revert of #9092 # Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> Not applicable here # Are there any user-facing changes? Yes, users can no implement the `Array` trait in their codebases again. <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. If there are any breaking changes to public APIs, please call them out. -->
…ache#9234) This reverts commit 721f373. # Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. --> - Discussed in apache#9184 - Closes apache#9184 # Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> As discussed in Discussed in apache#9184, rather than sealing the `Array` trait, it's going to potentially be marked `unsafe` so that projects have time to find alternatives for their use-cases that are now satisfied by a custom `Array` implementation. # What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> Clean revert of apache#9092 # Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> Not applicable here # Are there any user-facing changes? Yes, users can no implement the `Array` trait in their codebases again. <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. If there are any breaking changes to public APIs, please call them out. -->
…unsafe` (#9234) (#9313) - Part of #9240 - Related to #9184 This is a backport of the following PR to the 57 line - #9234 from @gabotechs As discussed in #9184, rather than sealing the Array trait which broke several downstream crates, this PR markes the trait as `unsafe` so that projects have time to find alternatives for their use-cases that are now satisfied by a custom Array implementation. Co-authored-by: Gabriel <45515538+gabotechs@users.noreply.github.com>
Which issue does this PR close?
try_binarywhenArrayis implemented incorrectly in external crate #9106Rationale for this change
This trait is not meant to be overridden, and doing so will break many kernels in sometimes subtle ways.
What changes are included in this PR?
Seals the Array trait to prevent implementation outside of arrow-array.
Are these changes tested?
Are there any user-facing changes?