[
https://issues.apache.org/jira/browse/ARROW-18272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17632147#comment-17632147
]
Zepu Zhang commented on ARROW-18272:
------------------------------------
Yes, I'm making it work that way for now. Actually I have a case where I don't
want the convenience of passing a str to it, because I'm processing a large
number of files, and I don't want it to do the default credential inference for
each file. So I do this:
```
gcs = pyarrow.fs.GcsFileSystem(token=..., credential_token_expiration=...)
parquet_file =
pyarrow.parquet.ParquetFile(gcs.open_input_file('mybucket/abc/d.parquet'))
```
However, API consistency and function signatures suggest `ParquetFile` and
`read_metadata` should accept the same types of `where`.
> [pyarrow] ParquetFile does not recognize GCS cloud path as a string
> -------------------------------------------------------------------
>
> Key: ARROW-18272
> URL: https://issues.apache.org/jira/browse/ARROW-18272
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 10.0.0
> Reporter: Zepu Zhang
> Priority: Minor
>
> I have a Parquet file at
>
> path = 'gs://mybucket/abc/d.parquet'
>
> `pyarrow.parquet.read_metadata(path)` works fine.
>
> `pyarrow.parquet.ParquetFile(path)` raises "Failed to open local file
> 'gs://mybucket/abc/d.parquet'.
>
> Looks like ParquetFile misses the path resolution logic found in
> `read_metadata`
--
This message was sent by Atlassian Jira
(v8.20.10#820010)