[
https://issues.apache.org/jira/browse/ARROW-7792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17069043#comment-17069043
]
Wes McKinney commented on ARROW-7792:
-------------------------------------
[~npr] we should probably revisit this in context with Feather V2 ARROW-5510.
Now writing is boiled down to a single function
{{arrow::ipc::feather::WriteTable}} which can fail.
In Python we have this scenario guarded with try/except to make sure that the
file handle is cleaned up (we got identical bug reports):
https://github.com/apache/arrow/blob/master/python/pyarrow/feather.py#L179
> [R] read_feather does not close connection to file
> --------------------------------------------------
>
> Key: ARROW-7792
> URL: https://issues.apache.org/jira/browse/ARROW-7792
> Project: Apache Arrow
> Issue Type: Bug
> Components: R
> Reporter: Martin
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.17.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> x = as.data.frame(seq(1:100))
> pbFilename <- file.path(getwd(), "reproduceBug.feather")
> arrow::write_feather(x = x, sink = pbFilename)
> file.exists(pbFilename)
> file.remove(pbFilename)
> arrow::write_feather(x = x, sink = pbFilename)
> tempDX <- arrow::read_feather(file = pbFilename, as_data_frame = T)
> file.exists(pbFilename)
> file.remove(pbFilename)
> >Warning message:
> >In file.remove(pbFilename) :
> >cannot remove file
> >'C:/Martin/Repo/ReinforcementLearner/reproduceBug.feather', reason
> > 'Permission denied'
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)