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

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

johnjiang commented on a change in pull request #1240: ARROW-1555 [Python] 
Implement Dask exists function
URL: https://github.com/apache/arrow/pull/1240#discussion_r146362289
 
 

 ##########
 File path: python/pyarrow/parquet.py
 ##########
 @@ -985,7 +985,7 @@ def write_to_dataset(table, root_path, partition_cols=None,
     else:
         fs = _ensure_filesystem(filesystem)
 
-    if not fs.exists(root_path):
+    if not fs.exists(root_path) and fs.isfilestore():
 
 Review comment:
   Would be better to switch the checks around
   
   ```
    if fs.isfilestore() and not fs.exists(root_path) :
   ```
   
   That way we don't do an unnecessary `exists()` check if it's not a file 
store.`

----------------------------------------------------------------
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] write_to_dataset on s3
> -------------------------------
>
>                 Key: ARROW-1555
>                 URL: https://issues.apache.org/jira/browse/ARROW-1555
>             Project: Apache Arrow
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Young-Jun Ko
>            Assignee: Florian Jetter
>            Priority: Trivial
>              Labels: pull-request-available
>             Fix For: 0.8.0
>
>
> When writing a arrow table to s3, I get an NotImplemented Exception.
> The root cause is in _ensure_filesystem and can be reproduced as follows:
> import pyarrow
> import pyarrow.parquet as pqa
> import s3fs
> s3 = s3fs.S3FileSystem()
> pqa._ensure_filesystem(s3).exists("anything")
> It appears that the S3FSWrapper that is instantiated in _ensure_filesystem 
> does not expose the exist method of s3.



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

Reply via email to