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/05/07 10:03:00 UTC

[jira] [Created] (ARROW-8729) [C++][Dataset] Only selecting a partition column results in empty table

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

             Summary: [C++][Dataset] Only selecting a partition column results in empty table
                 Key: ARROW-8729
                 URL: https://issues.apache.org/jira/browse/ARROW-8729
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++
            Reporter: Joris Van den Bossche
             Fix For: 1.0.0


Python reproducer:

{code}
import pyarrow as pa
import pyarrow.parquet as pq
import pyarrow.dataset as ds
path = "test_dataset"

table = pa.table({'part': ['a', 'a', 'b', 'b'], 'col': [1, 2, 3, 4]})
pq.write_to_dataset(table, str(path), partition_cols=["part"])
{code}

gives

{code}
In [38]: ds.dataset(str(path), partitioning="hive").to_table().num_rows                                                                                                                                            
Out[38]: 4

In [39]: ds.dataset(str(path), partitioning="hive").to_table(columns=["part"]).num_rows                                                                                                                            
Out[39]: 0
{code}

The schema correctly only includes the "part" column, but there are no rows.

cc [~bkietz]



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