You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2021/01/06 16:08:01 UTC

[jira] [Resolved] (ARROW-11024) [C++][Parquet] Writing List to parquet sometimes writes wrong data

     [ https://issues.apache.org/jira/browse/ARROW-11024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antoine Pitrou resolved ARROW-11024.
------------------------------------
    Resolution: Fixed

Issue resolved by pull request 9091
[https://github.com/apache/arrow/pull/9091]

> [C++][Parquet] Writing List<Struct> to parquet sometimes writes wrong data
> --------------------------------------------------------------------------
>
>                 Key: ARROW-11024
>                 URL: https://issues.apache.org/jira/browse/ARROW-11024
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 2.0.0
>         Environment: macOS Catalina, Python 3.7.3, Pyarrow 2.0.0
>            Reporter: George Deamont
>            Assignee: Joris Van den Bossche
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.0.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
>  Sometimes when writing tables that contain List<Struct> columns, the data is written incorrectly. Here is a code sample that produces the error. There are no exceptions raised here, but a simple equality check via equals() yields False for the second test case... 
>  
> {code:java}
> import pyarrow as pa
> import pyarrow.parquet as pq
> # Write small amount of data to parquet file, and read it back. In this case, both tables are equal.
> data1 = [[{'x':'abc','y':'abc'}]]*100 + [[{'x':'abc','y':'gcb'}]]*100
> array1 = pa.array(data1)
> table1 = pa.table([array1],names=['column'])
> pq.write_table(table1,'temp1.parquet')
> table1_1 = pq.read_table('temp1.parquet')
> print(table1_1.equals(table1))
> # Write larger amount of data to parquet file, and read it back. In this case, the tables are not equal.
> data2 = data1*100
> array2 = pa.array(data2)
> table2 = pa.table([array2],names=['column'])
> pq.write_table(table2,'temp2.parquet')
> table2_1 = pq.read_table('temp2.parquet')
> print(table2_1.equals(table2))
> {code}
>  
>  



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