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

[Java] BaseVariableWidthVector only supports 1 GiB through safe interfaces #220

Open
Kimahriman opened this issue Feb 4, 2023 · 1 comment
Labels
Type: bug Something isn't working

Comments

@Kimahriman
Copy link

Describe the bug, including details regarding any error messages, version, and platform.

apache/arrow#13815 fixed an issue with a misleading error caused by going over the 2GiB limit of a variable width vector, but it also introduced a 1 GiB limit when using the safe interfaces. Basically whenever you try to add data beyond 1 GiB, the vector will try to double itself to the next power of two, which would be 2147483648, which is greater than Integer.MAX_VALUE which is 2147483647, thus throwing a OversizedAllocationException. This effectively limits the total size allowed in the buffer to 1 GiB, even though it should only really be bound by the max offset being less than Integer.MAX_VALUE.

See apache/spark#39572 (comment) and the comment above it for how I could recreate the issue.

Component(s)

Java

@Kimahriman Kimahriman added the Type: bug Something isn't working label Feb 4, 2023
@jjbskir
Copy link

jjbskir commented Aug 1, 2023

Hey! I ran into the same issue recently. I wanted to see if there was any progress to support variables between 1GB to 2GB? Or any supported work arounds?

Happy to open a PR to support this. I think an solution would to add an additional check in reallocDataBuffer if the desiredAllocSize is greater then 1GB, but less then 2GB to just set the newAllocationSize to the max value.

@assignUser assignUser transferred this issue from apache/arrow Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants