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)