kevinjqliu commented on code in PR #1499:
URL: https://github.com/apache/iceberg-python/pull/1499#discussion_r1911101051


##########
tests/integration/test_partitioning_key.py:
##########
@@ -823,11 +789,6 @@ def test_partition_key(
             
snapshot.manifests(iceberg_table.io)[0].fetch_manifest_entry(iceberg_table.io)[0].data_file.file_path
         )
         # Special characters in partition value are sanitized when written to 
the data file's partition field
-        # Use `make_compatible_name` to match the sanitize behavior
-        sanitized_record = (
-            Record(**{make_compatible_name(k): v for k, v in 
vars(expected_partition_record).items()})
-            if make_compatible_name
-            else expected_partition_record
-        )
+        sanitized_record = Record(**{make_compatible_name(k): v for k, v in 
vars(expected_partition_record).items()})

Review Comment:
   > (Aside: it's not easy to have default value for a pytest.mark.parametrize 
arg I think which is why I specified None each time before - and probably why 
there was no e.g. spark_create_table_sql_for_justification: str = None before 
that too)
   
   oh i didn't know that! My comment was based on the fact that we can set a 
default `None` value. 
   
   > doesn't it make more sense to be enabled by a boolean argument that we 
only set to True for the special field test case?
   
   yea thats also the point i want to make. make it clear that only certain 
test cases requires `make_compatible_name`
   
   but also, this is a nit comment, we dont necessary have to do this.
   



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