gedaliakliger opened a new pull request, #4443: URL: https://github.com/apache/iceberg-python/pull/4443
# Rationale for this change `PartitionSpec.partition_to_path` URL-encodes field names and values to match Java, which uses `java.net.URLEncoder` ([PartitionSpec.java](https://github.com/apache/iceberg/blob/main/api/src/main/java/org/apache/iceberg/PartitionSpec.java)). `quote_plus` differs from it on two characters: Java leaves `*` as is and escapes `~` to `%7E`, while PyIceberg wrote `%2A` and a literal `~`. A partition value such as `a*b~c` therefore got the path `a%2Ab~c` from PyIceberg and `a*b%7Ec` from Java, and a different `partitions.<path>` key in the snapshot summary. ## Are these changes tested? Yes. `test_partition_spec_to_path_asterisk_and_tilde` fails on `main` and passes with this change. I ran `tests/table/test_partitioning.py`, `tests/table/test_locations.py` and `tests/table/test_snapshots.py` with `-m unit`, and ruff and mypy on the changed files. The rest is left to CI. ## Are there any user-facing changes? New data files for partitions whose field name or value contains `*` or `~` are written under the Java-style path. Existing files are unaffected, since manifests store full paths. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
