File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,10 @@ def test_partition_value_in_path(object_storage: bool) -> None:
9797 assert partition_segment == "string_field=example_string"
9898
9999
100- def test_object_storage_exclude_partition_in_path () -> None :
100+ # NB: We test here with None partition key too because disabling partitioned paths still replaces final / with - even in
101+ # paths of un-partitioned files. This matches the behaviour of the Java implementation.
102+ @pytest .mark .parametrize ("partition_key" , [PARTITION_KEY , None ])
103+ def test_object_storage_partitioned_paths_disabled (partition_key : Optional [PartitionKey ]) -> None :
101104 provider = load_location_provider (
102105 table_location = "table_location" ,
103106 table_properties = {
@@ -106,7 +109,7 @@ def test_object_storage_exclude_partition_in_path() -> None:
106109 },
107110 )
108111
109- location = provider .new_data_location ("test.parquet" , PARTITION_KEY )
112+ location = provider .new_data_location ("test.parquet" , partition_key )
110113
111114 # No partition values included in the path and last part of entropy is separated with "-"
112115 assert location == "table_location/data/0110/1010/0011/11101000-test.parquet"
You can’t perform that action at this time.
0 commit comments