smaheshwar-pltr commented on code in PR #1457:
URL: https://github.com/apache/iceberg-python/pull/1457#discussion_r1894689633


##########
tests/integration/test_partitioning_key.py:
##########
@@ -722,6 +723,25 @@
             (CAST('2023-01-01 11:55:59.999999' AS TIMESTAMP), 
CAST('2023-01-01' AS DATE), 'some data');
             """,
         ),
+        # 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%23field=special%20string",
+            f"""CREATE TABLE {identifier} (
+                `special#string#field` string
+            )
+            USING iceberg
+            PARTITIONED BY (
+                identity(`special#string#field`)
+            )
+            """,
+            f"""INSERT INTO {identifier}
+            VALUES
+            ('special string')
+            """,
+        ),

Review Comment:
   But the `Record` comparison still fails because of the non-optional 
sanitisation-transformation described in 
https://github.com/apache/iceberg/issues/10120. And, as it stands, the provided 
`Record` param is used [to check 
`key.partition`](https://github.com/apache/iceberg-python/blob/main/tests/integration/test_partitioning_key.py#L748)
 so can't be changed because that should be unsanitised, IIUC.
   
   Think some test rewiring might be required - maybe providing a separate 
record param that's by default the other one, just for this justification 
check, but I wonder if we're really just testing spark behaviour then.



-- 
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

Reply via email to