-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-44344: [Java] fix VectorSchemaRoot.getTransferPair for NullVector #44631
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
Conversation
| @Override | ||
| public BufferAllocator getAllocator() { | ||
| throw new UnsupportedOperationException("Tried to get allocator from NullVector"); | ||
| return null; |
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 haven't added a test to check this returns null because this seems to me an implementation detail. Please let me know if you think otherwise.
vibhatha
left a comment
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 assumed we are going to wait till nullability annotations are properly integrated.
I think I understand the value of requiring The ability to make zero-copy slices of ValueVector and VectorSchemaRoot is important to our usage of Arrow. Do you think it's possible to fix the bug and file an issue to forbid |
|
Right. I understand your point. We could create an issue for this and comment in the method. @lidavidm WDYT? |
lidavidm
left a comment
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.
Can we update the base getAllocator docstring to note that some subclasses may not have an allocator? Otherwise I didn't mean that we should block on nullability annotations, just that it would provide an additional layer of checks.
Fair enough. Thanks for clarifying @lidavidm |
8c4927b to
8c1c1d8
Compare
…ector Signed-off-by: Maksim Yegorov <findmaksim@gmail.com> Code review comment: Add javadoc to getAllocator base method. mvn spotless:apply linter retrigger checks
|
Any idea of what's causing the
Seems like a flaky error? #43264 (comment) |
|
Hmm...I merged a gRPC upgrade earlier which had passed CI but maybe it's not quite safe yet. (I recall some newer version of gRPC or its dependencies started requiring newer glibc) |
|
Yup, reverting... #44645 |
|
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit c3601a9. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them. |
…ector (apache#44631) Do not throw [UnsupportedOperationException("Tried to get allocator from NullVector")](https://github.com/apache/arrow/blob/release-18.0.0-rc0/java/vector/src/main/java/org/apache/arrow/vector/NullVector.java#L160) from [VectorSchemaRoot.slice()](https://github.com/apache/arrow/blob/release-18.0.0-rc0/java/vector/src/main/java/org/apache/arrow/vector/VectorSchemaRoot.java#L341) when slicing a VSR containing a NullVector or ZeroVector. Details in apache#44344 Added unit test that would trigger an UnsupportedOperationException on the legacy path. * GitHub Issue: apache#44344 Authored-by: Maksim Yegorov <59841139+maksimyego-db@users.noreply.github.com> Signed-off-by: David Li <li.davidm96@gmail.com>
…tor (apache#44631) (#94) * apacheGH-44626: [Java] fix SplitAndTransfer throws for empty MapVector (apache#44627) Empty MapVector.splitAndTransfer throws `java.lang.IndexOutOfBoundsException`. Details in apache#44626 Fixed for MapVector as for other vector types in apache#41066 Added unit test mimicking the scenario we've observed where MapVector's offset buffer capacity is 0. * GitHub Issue: apache#44626 Authored-by: Maksim Yegorov <59841139+maksimyego-db@users.noreply.github.com> Signed-off-by: David Li <li.davidm96@gmail.com> * apacheGH-44344: [Java] fix VectorSchemaRoot.getTransferPair for NullVector (apache#44631) Do not throw [UnsupportedOperationException("Tried to get allocator from NullVector")](https://github.com/apache/arrow/blob/release-18.0.0-rc0/java/vector/src/main/java/org/apache/arrow/vector/NullVector.java#L160) from [VectorSchemaRoot.slice()](https://github.com/apache/arrow/blob/release-18.0.0-rc0/java/vector/src/main/java/org/apache/arrow/vector/VectorSchemaRoot.java#L341) when slicing a VSR containing a NullVector or ZeroVector. Details in apache#44344 Added unit test that would trigger an UnsupportedOperationException on the legacy path. * GitHub Issue: apache#44344 Authored-by: Maksim Yegorov <59841139+maksimyego-db@users.noreply.github.com> Signed-off-by: David Li <li.davidm96@gmail.com> --------- Signed-off-by: David Li <li.davidm96@gmail.com> Co-authored-by: Maksim Yegorov <997437+myegorov@users.noreply.github.com>
…ector (apache#44631) ### Rationale for this change Do not throw [UnsupportedOperationException("Tried to get allocator from NullVector")](https://github.com/apache/arrow/blob/release-18.0.0-rc0/java/vector/src/main/java/org/apache/arrow/vector/NullVector.java#L160) from [VectorSchemaRoot.slice()](https://github.com/apache/arrow/blob/release-18.0.0-rc0/java/vector/src/main/java/org/apache/arrow/vector/VectorSchemaRoot.java#L341) when slicing a VSR containing a NullVector or ZeroVector. Details in apache#44344 ### Are these changes tested? Added unit test that would trigger an UnsupportedOperationException on the legacy path. * GitHub Issue: apache#44344 Authored-by: Maksim Yegorov <59841139+maksimyego-db@users.noreply.github.com> Signed-off-by: David Li <li.davidm96@gmail.com>
Rationale for this change
Do not throw UnsupportedOperationException("Tried to get allocator from NullVector") from VectorSchemaRoot.slice() when slicing a VSR containing a NullVector or ZeroVector. Details in #44344
Are these changes tested?
Added unit test that would trigger an UnsupportedOperationException on the legacy path.