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

ASF GitHub Bot commented on ARROW-2090:
---------------------------------------

Posnet commented on issue #1559: ARROW-2090: [Python] Add context methods to 
ParquetWriter
URL: https://github.com/apache/arrow/pull/1559#issuecomment-362969944
 
 
   I'm not sure why the plasma store tests are failing. As far as I can work 
out, the code I changed doesn't touch the plasma code at all. 

----------------------------------------------------------------
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:
us...@infra.apache.org


> [Python] Add context manager methods to ParquetWriter
> -----------------------------------------------------
>
>                 Key: ARROW-2090
>                 URL: https://issues.apache.org/jira/browse/ARROW-2090
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python
>            Reporter: Alec Posney
>            Priority: Minor
>              Labels: pull-request-available
>
> Add the ability to use python {{with}} syntax on the {{ParquetWriter}} object.
> For example:
> {code:python}
> with pq.ParquetWriter(foo, schema) as writer:
>     writer.write_table(table)
> {code}
> The benefit of this syntax is that it removes the chances of you writing out 
> a partial (invalid) parquet file, which is currently possible if you forget 
> to call the close method, or more likely the close method is not called due 
> to an exception being thrown. 
> It should still be possible to use the previous syntax for backwards 
> compatibility and fine grained control reasons.
> Similarly, the {{parquet}} module level {{write_table}} method should be able 
> to use the new syntax without changing previous behaviour. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to