Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions python/pyarrow/tests/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,10 @@ def test_is_nested_or_struct():
assert types.is_nested(pa.large_list(pa.int32()))
assert types.is_nested(pa.list_view(pa.int32()))
assert types.is_nested(pa.large_list_view(pa.int32()))
assert types.is_nested(pa.map_(pa.string(), pa.int32()))
assert types.is_nested(pa.run_end_encoded(pa.int32(), pa.string()))
assert not types.is_nested(pa.int32())
assert not types.is_nested(pa.dictionary(pa.int32(), pa.string()))


def test_is_union():
Expand Down
3 changes: 2 additions & 1 deletion python/pyarrow/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
_UNION_TYPES = {lib.Type_SPARSE_UNION, lib.Type_DENSE_UNION}
_NESTED_TYPES = {lib.Type_LIST, lib.Type_FIXED_SIZE_LIST, lib.Type_LARGE_LIST,
lib.Type_LIST_VIEW, lib.Type_LARGE_LIST_VIEW,
lib.Type_STRUCT, lib.Type_MAP} | _UNION_TYPES
lib.Type_STRUCT, lib.Type_MAP,
lib.Type_RUN_END_ENCODED} | _UNION_TYPES


class TypesEnum(IntEnum):
Expand Down