Skip to content

Commit 79b5cf0

Browse files
committed
add to test
1 parent b2d9f06 commit 79b5cf0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

β€Žtests/integration/test_writes/test_writes.pyβ€Ž

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,7 @@ def test_sanitize_character_partitioned_avro_bug(catalog: Catalog) -> None:
12111211
pass
12121212

12131213
schema = Schema(
1214-
NestedField(id=1, name="😎", field_type=IntegerType(), required=False),
1214+
NestedField(id=1, name="😎", field_type=StringType(), required=False),
12151215
)
12161216

12171217
partition_spec = PartitionSpec(
@@ -1228,7 +1228,11 @@ def test_sanitize_character_partitioned_avro_bug(catalog: Catalog) -> None:
12281228
identifier=table_name,
12291229
schema=schema,
12301230
partition_spec=partition_spec,
1231-
data=[pa.Table.from_arrays([range(22)], schema=pa.schema([pa.field("😎", pa.int32(), nullable=False)]))],
1231+
data=[
1232+
pa.Table.from_arrays(
1233+
[pa.array([str(i) for i in range(22)])], schema=pa.schema([pa.field("😎", pa.string(), nullable=False)])
1234+
)
1235+
],
12321236
)
12331237

12341238
assert len(tbl.scan().to_arrow()) == 22
@@ -1237,7 +1241,7 @@ def test_sanitize_character_partitioned_avro_bug(catalog: Catalog) -> None:
12371241
result = con.query("SELECT * FROM table_test_debug").fetchall()
12381242
assert len(result) == 22
12391243

1240-
assert con.query("SHOW table_test_debug").fetchone() == ("😎", "INTEGER", "YES", None, None, None)
1244+
assert con.query("SHOW table_test_debug").fetchone() == ("😎", "VARCHAR", "YES", None, None, None)
12411245

12421246

12431247
@pytest.mark.integration

0 commit comments

Comments
Β (0)