Skip to content

Commit 4bbd7b6

Browse files
author
Sreesh Maheshwar
committed
Failing test
1 parent bc0c6ac commit 4bbd7b6

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

tests/integration/test_partitioning_key.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
NestedField(field_id=12, name="fixed_field", field_type=FixedType(16), required=False),
7171
NestedField(field_id=13, name="decimal_field", field_type=DecimalType(5, 2), required=False),
7272
NestedField(field_id=14, name="uuid_field", field_type=UUIDType(), required=False),
73+
NestedField(field_id=15, name="special#string#field", field_type=StringType(), required=False),
7374
)
7475

7576

@@ -722,6 +723,25 @@
722723
(CAST('2023-01-01 11:55:59.999999' AS TIMESTAMP), CAST('2023-01-01' AS DATE), 'some data');
723724
""",
724725
),
726+
# Test that special characters are URL-encoded
727+
(
728+
[PartitionField(source_id=15, field_id=1001, transform=IdentityTransform(), name="special#string#field")],
729+
["special string"],
730+
Record(**{"special#string#field": "special string"}), # type: ignore
731+
"special%23string%23field=special%20string",
732+
f"""CREATE TABLE {identifier} (
733+
`special#string#field` string
734+
)
735+
USING iceberg
736+
PARTITIONED BY (
737+
identity(`special#string#field`)
738+
)
739+
""",
740+
f"""INSERT INTO {identifier}
741+
VALUES
742+
('special string')
743+
""",
744+
),
725745
],
726746
)
727747
@pytest.mark.integration

0 commit comments

Comments
 (0)