You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "David Rauschenbach (Jira)" <ji...@apache.org> on 2022/09/15 15:37:00 UTC

[jira] [Commented] (ARROW-11793) [C++][Parquet] dictinct_count broken (always 0) in column chunk statistics

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

David Rauschenbach commented on ARROW-11793:
--------------------------------------------

I think there's more to this. When looking at the tpc-h file customer_0_0.parquet, parquet-tools shows null counts yet Arrow reports HasNullCount() == FALSE.

 
{code:java}
 $ parquet-tools inspect tpch/customer_0_0.parquet --detail
...
■■■■■■■■■■■■■■■■ColumnChunk
■■■■■■■■■■■■■■■■■■■■file_offset = 184618
■■■■■■■■■■■■■■■■■■■■meta_data = ColumnMetaData
■■■■■■■■■■■■■■■■■■■■■■■■type = 6
■■■■■■■■■■■■■■■■■■■■■■■■encodings = list
■■■■■■■■■■■■■■■■■■■■■■■■■■■■3
■■■■■■■■■■■■■■■■■■■■■■■■■■■■0
■■■■■■■■■■■■■■■■■■■■■■■■■■■■4
■■■■■■■■■■■■■■■■■■■■■■■■path_in_schema = list
■■■■■■■■■■■■■■■■■■■■■■■■■■■■c_address
■■■■■■■■■■■■■■■■■■■■■■■■num_values = 7500
■■■■■■■■■■■■■■■■■■■■■■■■total_uncompressed_size = 207320
■■■■■■■■■■■■■■■■■■■■■■■■total_compressed_size = 207320
■■■■■■■■■■■■■■■■■■■■■■■■data_page_offset = 184618
■■■■■■■■■■■■■■■■■■■■■■■■statistics = Statistics
■■■■■■■■■■■■■■■■■■■■■■■■■■■■max = b'zyWvi,SGc,tXTls'
■■■■■■■■■■■■■■■■■■■■■■■■■■■■min = b'   5L06W67,Mw8G'
■■■■■■■■■■■■■■■■■■■■■■■■■■■■null_count = 469
{code}

> [C++][Parquet] dictinct_count broken (always 0) in column chunk statistics
> --------------------------------------------------------------------------
>
>                 Key: ARROW-11793
>                 URL: https://issues.apache.org/jira/browse/ARROW-11793
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++, Parquet, Python
>    Affects Versions: 3.0.0
>            Reporter: ARF
>            Priority: Minor
>              Labels: parquet-statistics
>
> 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.20.10#820010)