kevinjqliu commented on code in PR #1457: URL: https://github.com/apache/iceberg-python/pull/1457#discussion_r1907551758
########## tests/integration/test_partitioning_key.py: ########## @@ -721,6 +753,27 @@ VALUES (CAST('2023-01-01 11:55:59.999999' AS TIMESTAMP), CAST('2023-01-01' AS DATE), 'some data'); """, + None, + ), + # Test that special characters are URL-encoded + ( + [PartitionField(source_id=15, field_id=1001, transform=IdentityTransform(), name="special#string+field")], + ["special string"], + Record(**{"special#string+field": "special string"}), # type: ignore + "special%23string%2Bfield=special+string", + f"""CREATE TABLE {identifier} ( + `special#string+field` string + ) + USING iceberg + PARTITIONED BY ( + identity(`special#string+field`) + ) + """, + f"""INSERT INTO {identifier} + VALUES + ('special string') + """, + lambda name: name.replace("#", "_x23").replace("+", "_x2B"), Review Comment: my concern was around providing context on "why" this lambda is here and implemented the way it is. [This comment](https://github.com/apache/iceberg-python/pull/1457/files#diff-ddd56fc195d637dbe64ed201cc875ec9cb5d67f243eabc438ccca4238a8508a9R825-R826) refers to [this function](https://github.com/apache/iceberg-python/blob/3b580111760f0749922ea593dbe0b1d602952438/pyiceberg/schema.py#L1303-L1307) which is also used in the write path to me, it make sense to use the same function to show that we're doing the same thing as what the underlying system is doing -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org