smaheshwar-pltr commented on code in PR #1499: URL: https://github.com/apache/iceberg-python/pull/1499#discussion_r1909541206
########## 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: Sorry, not sure I understand. If it's always going to be `pyiceberg.schema.make_compatible_name`, 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? I'm probably misunderstanding here again ########## 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 either) -- 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