You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Joris Van den Bossche (Jira)" <ji...@apache.org> on 2020/03/31 13:49:00 UTC

[jira] [Created] (ARROW-8286) [Python] Creating dataset from pathlib results in UnionDataset instead of FileSystemDataset

Joris Van den Bossche created ARROW-8286:
--------------------------------------------

             Summary: [Python] Creating dataset from pathlib results in UnionDataset instead of FileSystemDataset
                 Key: ARROW-8286
                 URL: https://issues.apache.org/jira/browse/ARROW-8286
             Project: Apache Arrow
          Issue Type: Bug
            Reporter: Joris Van den Bossche
            Assignee: Joris Van den Bossche
             Fix For: 0.17.0


{code}
import pyarrow as pa
import pyarrow.parquet as pq
import pyarrow.dataset as ds

table = pa.table({'a': np.random.randn(10), 'b': range(10), 'c': ['a', 'b'] * 5})
pq.write_table(table, "test.parquet")

import pathlib

ds.dataset(pathlib.Path("./test.parquet"))
# gives UnionDataset

ds.dataset(str(pathlib.Path("./test.parquet")))
# correctly gives FileSystemDataset
{code}

and since those two dataset classes have different API, this is important to give FileSystemDataset



--
This message was sent by Atlassian Jira
(v8.3.4#803005)