Skip to content

Commit

Permalink
add test to check if nullability is maintained
Browse files Browse the repository at this point in the history
  • Loading branch information
ion-elgreco committed Nov 17, 2023
1 parent ad5b2c3 commit c9cf446
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions python/tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,36 @@ def test_delta_schema():
pa.schema([("some_int", pa.int32()), ("some_string", pa.string())]),
False,
),
(
pa.schema(
[
pa.field("some_int", pa.uint32(), nullable=True),
pa.field("some_string", pa.string(), nullable=False),
]
),
pa.schema(
[
pa.field("some_int", pa.int32(), nullable=True),
pa.field("some_string", pa.string(), nullable=False),
]
),
False,
),
(
pa.schema(
[
pa.field("some_int", pa.uint32(), nullable=True),
pa.field("some_string", pa.string(), nullable=False),
]
),
pa.schema(
[
pa.field("some_int", pa.int32(), nullable=True),
pa.field("some_string", pa.large_string(), nullable=False),
]
),
True,
),
(
pa.schema([("some_int", pa.uint32()), ("some_string", pa.string())]),
pa.schema([("some_int", pa.int32()), ("some_string", pa.large_string())]),
Expand Down

0 comments on commit c9cf446

Please sign in to comment.