You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Al Taylor (Jira)" <ji...@apache.org> on 2020/05/12 12:19:00 UTC
[jira] [Created] (ARROW-8773) pyarrow schema.empty_table() does not
preserve nullability of fields
Al Taylor created ARROW-8773:
--------------------------------
Summary: 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
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)