You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2020/03/09 15:11:00 UTC
[jira] [Assigned] (ARROW-8011) [C++] Some buffers not resized when
reading from Parquet
[ https://issues.apache.org/jira/browse/ARROW-8011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antoine Pitrou reassigned ARROW-8011:
-------------------------------------
Assignee: Antoine Pitrou
> [C++] Some buffers not resized when reading from Parquet
> --------------------------------------------------------
>
> Key: ARROW-8011
> URL: https://issues.apache.org/jira/browse/ARROW-8011
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Reporter: Antoine Pitrou
> Assignee: Antoine Pitrou
> Priority: Major
>
> This may leak uninitialized data:
> {code:python}
> >>> table = pa.Table.from_pydict({"a": pa.array([0, None, None])})
> >>> table.column("a").chunk(0).buffers()[1].to_pybytes()
> b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
> >>> bio = io.BytesIO()
> >>> pq.write_table(table, bio, use_dictionary=False)
> >>> bio.seek(0)
> 0
> >>> table = pq.read_table(bio)
> >>> table.column("a").chunk(0).buffers()[1].to_pybytes()
> b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)