Skip to content

Commit 9999cbb

Browse files
author
Sreesh Maheshwar
committed
Remove special character testing
1 parent bc2eab8 commit 9999cbb

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tests/table/test_locations.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@
2828
from pyiceberg.typedef import EMPTY_DICT
2929
from pyiceberg.types import NestedField, StringType
3030

31-
TABLE_SCHEMA = Schema(NestedField(field_id=2, name="field", field_type=StringType(), required=False))
32-
PARTITION_FIELD = PartitionField(source_id=2, field_id=1002, transform=IdentityTransform(), name="part#field")
33-
PARTITION_SPEC = PartitionSpec(PARTITION_FIELD)
31+
PARTITION_FIELD = PartitionField(source_id=1, field_id=1002, transform=IdentityTransform(), name="string_field")
3432
PARTITION_KEY = PartitionKey(
35-
raw_partition_field_values=[PartitionFieldValue(PARTITION_FIELD, "example#val")],
36-
partition_spec=PARTITION_SPEC,
37-
schema=TABLE_SCHEMA,
33+
raw_partition_field_values=[PartitionFieldValue(PARTITION_FIELD, "example_string")],
34+
partition_spec=PartitionSpec(PARTITION_FIELD),
35+
schema=Schema(NestedField(field_id=1, name="string_field", field_type=StringType(), required=False)),
3836
)
3937

4038

@@ -95,9 +93,7 @@ def test_partition_value_in_path(object_storage: bool) -> None:
9593
location = provider.new_data_location("test.parquet", PARTITION_KEY)
9694
partition_segment = location.split("/")[-2]
9795

98-
# Field name is not encoded but partition value is - this differs from the Java implementation
99-
# https://github.com/apache/iceberg/blob/cdf748e8e5537f13d861aa4c617a51f3e11dc97c/core/src/test/java/org/apache/iceberg/TestLocationProvider.java#L304
100-
assert partition_segment == "part#field=example%23val"
96+
assert partition_segment == "string_field=example_string"
10197

10298

10399
def test_object_storage_exclude_partition_in_path() -> None:

0 commit comments

Comments
 (0)