You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Wes McKinney (Jira)" <ji...@apache.org> on 2020/05/14 20:43:00 UTC
[jira] [Updated] (ARROW-8773) [Python] pyarrow schema.empty_table()
does not preserve nullability of fields
[ https://issues.apache.org/jira/browse/ARROW-8773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wes McKinney updated ARROW-8773:
--------------------------------
Summary: [Python] pyarrow schema.empty_table() does not preserve nullability of fields (was: pyarrow schema.empty_table() does not preserve nullability of fields)
> [Python] pyarrow schema.empty_table() does not preserve nullability of fields
> -----------------------------------------------------------------------------
>
> Key: ARROW-8773
> URL: https://issues.apache.org/jira/browse/ARROW-8773
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 0.17.0
> Environment: linux, pyarrow 0.17.0 installed via pipenv
> Reporter: Al Taylor
> Priority: Major
>
> Introduced by PR: [https://github.com/apache/arrow/pull/2589]
>
> When a field in a schema is marked as not-nullable, calling empty_table() on the schema returns a table with nullable fields.
>
> reproduction
> {code:java}
> >>> import pyarrow as pa
> >>> s = pa.schema([pa.field('a', pa.int64(), nullable=False), pa.field('b', pa.int64())])
> >>> s
> a: int64 not null
> b: int64
> >>> e = s.empty_table()
> >>> e
> pyarrow.Table
> a: int64
> b: int64
> >>> e.schema
> a: int64
> b: int64
> >>> assert s == e.schema
> Traceback (most recent call last):
> File "<input>", line 1, in <module>
> AssertionError
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)