You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Joris Van den Bossche (Jira)" <ji...@apache.org> on 2020/05/20 08:22:00 UTC
[jira] [Commented] (ARROW-8860) [C++] Compressed Feather file with
struct array roundtrips incorrectly
[ https://issues.apache.org/jira/browse/ARROW-8860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17111912#comment-17111912 ]
Joris Van den Bossche commented on ARROW-8860:
----------------------------------------------
The same happens for list types, so I suppose it is generally for nested types (see ARROW-8868 report).
When using a larger table, you can also get an error when reading:
{code}
>>> table = pa.table({'col': pa.StructArray.from_arrays([[0, 1, 2]*10000, [1, 2, 3]*10000], names=["f1", "f2"])})
>>> feather.write_feather(table, "test_struct.feather")
>>> table2 = feather.read_table("test_struct.feather")
...
ArrowInvalid: Column 0: In chunk 0: Invalid: Struct child array #0 invalid: Invalid: Buffer #1 too small in array of type int64 and length 30000: expected at least 240000 byte(s), got 1049
{code}
So it seems it is not decompressing the child arrays?
> [C++] Compressed Feather file with struct array roundtrips incorrectly
> ----------------------------------------------------------------------
>
> Key: ARROW-8860
> URL: https://issues.apache.org/jira/browse/ARROW-8860
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Reporter: Joris Van den Bossche
> Priority: Major
>
> When writing a table with a Struct typed column, this is read back with garbage values when using compression (which is the default):
> {code:python}
> >>> table = pa.table({'col': pa.StructArray.from_arrays([[0, 1, 2], [1, 2, 3]], names=["f1", "f2"])})
> # roundtrip through feather
> >>> feather.write_feather(table, "test_struct.feather")
> >>> table2 = feather.read_table("test_struct.feather")
> >>> table2.column("col")
> <pyarrow.lib.ChunkedArray object at 0x7f0b0c4d7728>
> [
> -- is_valid: all not null
> -- child 0 type: int64
> [
> 24,
> 1261641627085906436,
> 1369095386551025664
> ]
> -- child 1 type: int64
> [
> 24,
> 1405756815161762308,
> 281479842103296
> ]
> ]
> {code}
> When not using compression, it is read back correctly:
> {code:python}
> >>> feather.write_feather(table, "test_struct.feather", compression="uncompressed")
> >>> table2 = feather.read_table("test_struct.feather")
> >>> table2.column("col")
> <pyarrow.lib.ChunkedArray object at 0x7f0b0e466778>
> [
> -- is_valid: all not null
> -- child 0 type: int64
> [
> 0,
> 1,
> 2
> ]
> -- child 1 type: int64
> [
> 1,
> 2,
> 3
> ]
> ]
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)