You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "ARF (Jira)" <ji...@apache.org> on 2021/02/26 11:28:00 UTC

[jira] [Created] (ARROW-11793) dictinct_count broken (always 0) in column chunk metadata statistics

ARF created ARROW-11793:
---------------------------

             Summary: dictinct_count broken (always 0) in column chunk metadata statistics
                 Key: ARROW-11793
                 URL: https://issues.apache.org/jira/browse/ARROW-11793
             Project: Apache Arrow
          Issue Type: Bug
          Components: Python
    Affects Versions: 3.0.0
            Reporter: ARF


The {{distinct_count}} attribute of the column chunk metadata statistics is broken: It always shows 0. This seems to be the case for all types of columns. Checked with int64 as well as dictionary encoded string columns:
{code:python}
import pyarrow as pa
import pyarrow.parquet as pq

table = pa.Table.from_pydict({
    'foo': pa.array(['ABC', 'DEF']).dictionary_encode()
})

pq.write_table(table, 'test_row_group_statistics.parquet', version='2.0', data_page_version='2.0')

pq_file = pq.ParquetFile('test_row_group_statistics.parquet')
print(pq_file.metadata.row_group(0).column(0).statistics)
{code}
Output:
{code:none}
<pyarrow._parquet.Statistics object at 0x0000020A1699D770>
  has_min_max: True
  min: ABC
  max: DEF
  null_count: 0
  distinct_count: 0
  num_values: 2
  physical_type: BYTE_ARRAY
  logical_type: String
  converted_type (legacy): UTF8
{code}



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