-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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-40937: [Java] Implement Holder-based functions for ViewVarCharVector & ViewVarBinaryVector #44187
Conversation
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.
Added a few comments. Thanks for starting this work.
java/vector/src/main/java/org/apache/arrow/vector/ViewVarCharVector.java
Outdated
Show resolved
Hide resolved
|
||
NullableViewVarCharHolder stringHolder = new NullableViewVarCharHolder(); | ||
|
||
setAndCheck(viewVarCharVector, 1, strings.get(0), stringHolder); |
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.
To check overwrite?
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.
Why do we need this? Could you explain a bit?
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 think it's not needed. I just missed it while adjusting the code. But you reminded me that it is necessary to add some overwrite test cases.
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 don't think it is a must. It is okay to leave it at this moment.
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.
PR LGTM. Just a few minor suggestions.
Thanks for working on this.
java/vector/src/main/java/org/apache/arrow/vector/ViewVarCharVector.java
Outdated
Show resolved
Hide resolved
java/vector/src/main/java/org/apache/arrow/vector/ViewVarCharVector.java
Outdated
Show resolved
Hide resolved
@lidavidm PR LGTM, please take a look. |
Thanks for your review. |
@ViggoC let's do it here. |
Whichever is easier for you. |
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.
Also we need the equivalent tests for binary data.
public void get(int index, NullableViewVarBinaryHolder holder) { | ||
// TODO: https://github.com/apache/arrow/issues/40936 | ||
throw new UnsupportedOperationException("Unsupported operation"); | ||
public void get(int index, NullableViewVarCharHolder holder) { |
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.
This is incorrect? Does this compile?
@@ -0,0 +1,144 @@ | |||
/* |
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 would recommend to keep them in the TestVarCharViewVector
for the moment. I know the naming is not so matching here. For other VarBinaryView
tests we used the same test class. And I see it is not very matching. Maybe we could rename the class to TestVariableWidthViewVector
? This is an issue from my part in the initial PR. We can fix it here.
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.
Overall PR LGTM, could we just to this change @ViggoC?
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.
Rename the test class to TestVariableWidthViewVector
and move testSetNullableViewVarBinaryHolder
to it.
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.
Thanks PR LGTM!
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit bc923bd. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 9 possible false positives for unstable benchmarks that are known to sometimes produce them. |
ViewVarBinaryVector
#40936ViewVarCharVector
#40937