[jira] [Comment Edited] (ARROW-1694) [Java] Unclosed VectorSchemaRoot in JsonFileReader#readDictionaryBatches()

2017-11-07 Thread Bryan Cutler (JIRA)

[ 
https://issues.apache.org/jira/browse/ARROW-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16242575#comment-16242575
 ] 

Bryan Cutler edited comment on ARROW-1694 at 11/7/17 6:24 PM:
--

[~tedyu] closing the VectorSchemaRoot will release the vector data buffers 
also, so it needs to be kept open to use the data and can not be automatically 
closed after {{read(root)}} is called.

Take a look at 
https://github.com/apache/arrow/blob/master/java/tools/src/main/java/org/apache/arrow/tools/Integration.java#L166
Here the JsonFileReader calls {{read(root)}} which loads values into the root 
owned by  {{ArrowFileWriter}} so that it can write back out the values.  The 
VectorSchemaRoot is only closed after all writing is done.

I'm closing this as not a problem


was (Author: bryanc):
[~tedyu]] closing the VectorSchemaRoot will release the vector data buffers 
also, so it needs to be kept open to use the data and can not be automatically 
closed after {{read(root)}} is called.

Take a look at 
https://github.com/apache/arrow/blob/master/java/tools/src/main/java/org/apache/arrow/tools/Integration.java#L166
Here the JsonFileReader calls {{read(root)}} which loads values into the root 
owned by  {{ArrowFileWriter}} so that it can write back out the values.  The 
VectorSchemaRoot is only closed after all writing is done.

I'm closing this as not a problem

> [Java] Unclosed VectorSchemaRoot in JsonFileReader#readDictionaryBatches()
> --
>
> Key: ARROW-1694
> URL: https://issues.apache.org/jira/browse/ARROW-1694
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: Java - Vectors
>Reporter: Ted Yu
>Priority: Minor
> Fix For: 0.8.0
>
>
> {code}
>   VectorSchemaRoot root = new VectorSchemaRoot(fields, vectors, 
> vector.getAccessor().getValueCount());
>   read(root);
> {code}
> root should be closed upon return from the method.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (ARROW-1694) [Java] Unclosed VectorSchemaRoot in JsonFileReader#readDictionaryBatches()

2017-11-07 Thread Bryan Cutler (JIRA)

[ 
https://issues.apache.org/jira/browse/ARROW-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16242575#comment-16242575
 ] 

Bryan Cutler edited comment on ARROW-1694 at 11/7/17 6:24 PM:
--

[~tedyu]] closing the VectorSchemaRoot will release the vector data buffers 
also, so it needs to be kept open to use the data and can not be automatically 
closed after {{read(root)}} is called.

Take a look at 
https://github.com/apache/arrow/blob/master/java/tools/src/main/java/org/apache/arrow/tools/Integration.java#L166
Here the JsonFileReader calls {{read(root)}} which loads values into the root 
owned by  {{ArrowFileWriter}} so that it can write back out the values.  The 
VectorSchemaRoot is only closed after all writing is done.

I'm closing this as not a problem


was (Author: bryanc):
[~ted_yu] closing the VectorSchemaRoot will release the vector data buffers 
also, so it needs to be kept open to use the data and can not be automatically 
closed after {{read(root)}} is called.

Take a look at 
https://github.com/apache/arrow/blob/master/java/tools/src/main/java/org/apache/arrow/tools/Integration.java#L166
Here the JsonFileReader calls {{read(root)}} which loads values into the root 
owned by  {{ArrowFileWriter}} so that it can write back out the values.  The 
VectorSchemaRoot is only closed after all writing is done.

I'm closing this as not a problem

> [Java] Unclosed VectorSchemaRoot in JsonFileReader#readDictionaryBatches()
> --
>
> Key: ARROW-1694
> URL: https://issues.apache.org/jira/browse/ARROW-1694
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: Java - Vectors
>Reporter: Ted Yu
>Priority: Minor
> Fix For: 0.8.0
>
>
> {code}
>   VectorSchemaRoot root = new VectorSchemaRoot(fields, vectors, 
> vector.getAccessor().getValueCount());
>   read(root);
> {code}
> root should be closed upon return from the method.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)