You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Chris Ellison (JIRA)" <ji...@apache.org> on 2018/03/01 20:11:01 UTC

[jira] [Comment Edited] (ARROW-2242) [Python] ParquetFile.read does not accommodate large binary data

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

Chris Ellison edited comment on ARROW-2242 at 3/1/18 8:10 PM:
--------------------------------------------------------------

Related ticket is not code-related, but workflow-related in terms of reading/writing binary data


was (Author: leftscreencorner):
Not code-related, but workflow related in terms of reading/writing binary data.

> [Python] ParquetFile.read does not accommodate large binary data 
> -----------------------------------------------------------------
>
>                 Key: ARROW-2242
>                 URL: https://issues.apache.org/jira/browse/ARROW-2242
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 0.8.0
>            Reporter: Chris Ellison
>            Priority: Major
>             Fix For: 0.9.0
>
>
> When reading a parquet file with binary data > 2 GiB, we get an ArrowIOError due to it not creating chunked arrays. Reading each row group individually and then concatenating the tables works, however.
>  
> {code:java}
> import pandas as pd
> import pyarrow as pa
> import pyarrow.parquet as pq
> x = pa.array(list('1' * 2**30))
> demo = 'demo.parquet'
> def scenario():
>     t = pa.Table.from_arrays([x], ['x'])
>     writer = pq.ParquetWriter(demo, t.schema)
>     for i in range(2):
>         writer.write_table(t)
>     writer.close()
>     pf = pq.ParquetFile(demo)
>     # pyarrow.lib.ArrowIOError: Arrow error: Invalid: BinaryArray cannot contain more than 2147483646 bytes, have 2147483647
>     t2 = pf.read()
>     # Works, but note, there are 32 row groups, not 2 as suggested by:
>     # https://arrow.apache.org/docs/python/parquet.html#finer-grained-reading-and-writing
>     tables = [pf.read_row_group(i) for i in range(pf.num_row_groups)]
>     t3 = pa.concat_tables(tables)
> scenario()
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)