-
Couldn't load subscription status.
- Fork 47
GH-319: [Java] recipe to concatenate value vectors as one #320
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
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.
If the utility is package-private, then it's not usable! File a PR upstream first to make it public and add tests.
Changed |
java/source/data.rst
Outdated
| toAppend.setValueCount(4); | ||
| System.out.println("IntVector to Append: " + toAppend); | ||
| VectorAppender appenderUtil = new VectorAppender(initialValues); | ||
| ValueVector resultOfVectorsAppended = toAppend.accept(appenderUtil, 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.
We don't need to close this? If it mutates the original vector, we should write it in a way that makes that clear
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.
Do you have any ideas why the leak wasn't caught? Maybe this ValueVector is also deleted after the dependencies were closed?
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.
probably because it mutates the original vector instead of allocating a new one...
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 more detail
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.
Just...don't use the return value.
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 given this was a private API before, I would prefer fixing upstream to just not return the vector
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 have updated the recipe to not use the return value. It is necessary to analyze the change upstream to not return value since it is part of the Value Vector.
|
Can you rebase here? |
…w-cookbook into value-vector-appender
This comment was marked as resolved.
This comment was marked as resolved.
|
Oh, hmm, never mind that. |
To close #319
Due to the use of JShell to run cookbook, it is not possible to create packages to access package-private objects, such as the org.apache.arrow.vector.util package. Therefore, I am only adding the recipe as a code block.