[
https://issues.apache.org/jira/browse/ARROW-1962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16308990#comment-16308990
]
ASF GitHub Bot commented on ARROW-1962:
---------------------------------------
siddharthteotia commented on a change in pull request #1455: [WIP] ARROW-1962:
[Java] Adding reset to ValueVector interface
URL: https://github.com/apache/arrow/pull/1455#discussion_r159350696
##########
File path:
java/vector/src/main/java/org/apache/arrow/vector/complex/MapVector.java
##########
@@ -302,6 +302,14 @@ public void clear() {
valueCount = 0;
}
+ @Override
+ public void reset() {
+ for (final ValueVector v : getChildren()) {
+ v.reset();
+ }
+ valueCount = 0;
Review comment:
That's not needed since the keeper of valueCount is not the child vector(s)
but the top level container map vector. getValueCount() doesn't consult the
child vectors for the valueCount and returns the valueCount tracked locally.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> [Java] Add reset() to ValueVector interface
> -------------------------------------------
>
> Key: ARROW-1962
> URL: https://issues.apache.org/jira/browse/ARROW-1962
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Java - Vectors
> Reporter: Bryan Cutler
> Assignee: Bryan Cutler
> Labels: pull-request-available
>
> The {{reset()}} method exists in some ValueVectors but not all. Its meaning
> is that it will bring the vector to an empty state, but not release any
> buffers (as opposed to clear() which resets and releases buffers).
> It should be added to the {{ValueVector}} interface and implemented in the
> vector hierarchy where it currently is not.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)