Skip to content

Commit

Permalink
Use quote_plus instead of quote to match Java behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
Sreesh Maheshwar committed Dec 21, 2024
1 parent 631a456 commit d6e375a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyiceberg/partitioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
Tuple,
TypeVar,
)
from urllib.parse import quote
from urllib.parse import quote_plus

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

value_str = quote(value_str, safe="")
value_str = quote_plus(value_str, safe="")
value_strs.append(value_str)

field_str = quote(partition_field.name, safe="")
field_str = quote_plus(partition_field.name, safe="")
field_strs.append(field_str)

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

0 comments on commit d6e375a

Please sign in to comment.