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

GH-44344: [Java] fix VectorSchemaRoot.getTransferPair for NullVector #44631

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

myegorov
Copy link
Contributor

@myegorov myegorov commented Nov 4, 2024

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.

@Override
public BufferAllocator getAllocator() {
throw new UnsupportedOperationException("Tried to get allocator from NullVector");
return null;
Copy link
Contributor Author

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.

Copy link
Collaborator

@vibhatha vibhatha left a 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.

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Nov 4, 2024
@myegorov
Copy link
Contributor Author

myegorov commented Nov 4, 2024

I assumed we are going to wait till nullability annotations are properly integrated.

I think I understand the value of requiring @Nullable checks, but wondering if the bugfix here should be blocked on the refactor? iiuc the return null in this PR is far from exceptional.

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 null by default as a fast follow? I'd be happy to look into this later but might require some rampup.

@vibhatha
Copy link
Collaborator

vibhatha commented Nov 4, 2024

Right. I understand your point. We could create an issue for this and comment in the method.

@lidavidm WDYT?

Copy link
Member

@lidavidm lidavidm left a 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.

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting committer review Awaiting committer review labels Nov 5, 2024
@vibhatha
Copy link
Collaborator

vibhatha commented Nov 5, 2024

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

@myegorov myegorov force-pushed the ARROW-44344 branch 3 times, most recently from 8c4927b to 8c1c1d8 Compare November 5, 2024 03:59
…ector

Signed-off-by: Maksim Yegorov <[email protected]>

Code review comment: Add javadoc to getAllocator base method.

mvn spotless:apply linter

retrigger checks
@myegorov
Copy link
Contributor Author

myegorov commented Nov 5, 2024

Any idea of what's causing the protoc-gen-grpc-java errors in https://github.com/apache/arrow/actions/runs/11677293979/job/32514967839?

Error: PROTOC FAILED: /build/java/flight/flight-core/target/protoc-plugins/protoc-gen-grpc-java-1.68.1-linux-x86_64.exe: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /build/java/flight/flight-core/target/protoc-plugins/protoc-gen-grpc-java-1.68.1-linux-x86_64.exe)

Seems like a flaky error? #43264 (comment)

@lidavidm
Copy link
Member

lidavidm commented Nov 5, 2024

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)

@lidavidm
Copy link
Member

lidavidm commented Nov 5, 2024

Yup, reverting... #44645

@lidavidm lidavidm merged commit c3601a9 into apache:main Nov 6, 2024
14 of 15 checks passed
@lidavidm lidavidm removed the awaiting merge Awaiting merge label Nov 6, 2024
@myegorov myegorov deleted the ARROW-44344 branch November 6, 2024 00:14
Copy link

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.

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

Successfully merging this pull request may close these issues.

4 participants