Skip to content

Commit d6e375a

Browse files
author
Sreesh Maheshwar
committed
Use quote_plus instead of quote to match Java behaviour
1 parent 631a456 commit d6e375a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pyiceberg/partitioning.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
Tuple,
3131
TypeVar,
3232
)
33-
from urllib.parse import quote
33+
from urllib.parse import quote_plus
3434

3535
from pydantic import (
3636
BeforeValidator,
@@ -234,10 +234,10 @@ def partition_to_path(self, data: Record, schema: Schema) -> str:
234234
partition_field = self.fields[pos]
235235
value_str = partition_field.transform.to_human_string(field_types[pos].field_type, value=data[pos])
236236

237-
value_str = quote(value_str, safe="")
237+
value_str = quote_plus(value_str, safe="")
238238
value_strs.append(value_str)
239239

240-
field_str = quote(partition_field.name, safe="")
240+
field_str = quote_plus(partition_field.name, safe="")
241241
field_strs.append(field_str)
242242

243243
path = "/".join([field_str + "=" + value_str for field_str, value_str in zip(field_strs, value_strs)])

0 commit comments

Comments
 (0)