kevinjqliu commented on code in PR #1176: URL: https://github.com/apache/iceberg-python/pull/1176#discussion_r1759766338
########## tests/integration/test_partition_evolution.py: ########## @@ -152,6 +201,36 @@ def test_multiple_adds(catalog: Catalog) -> None: ) +@pytest.mark.integration +@pytest.mark.parametrize("catalog", [pytest.lazy_fixture("session_catalog_hive"), pytest.lazy_fixture("session_catalog")]) +def test_add_void(catalog: Catalog, table_schema_simple: Schema) -> None: + simple_table = _create_table_with_schema(catalog, table_schema_simple, "1") + simple_table.update_spec().add_field("foo", VoidTransform(), "void_transform").commit() + _validate_new_partition_fields( + simple_table, 1000, 1, 1000, PartitionField(1, 1000, VoidTransform(), "void_transform") + ) + + +@pytest.mark.integration +@pytest.mark.parametrize("catalog", [pytest.lazy_fixture("session_catalog_hive"), pytest.lazy_fixture("session_catalog")]) +def test_add_void_generates_default_name(catalog: Catalog, table_schema_simple: Schema) -> None: + simple_table = _create_table_with_schema(catalog, table_schema_simple, "1") + simple_table.update_spec().add_field("foo", VoidTransform()).commit() + _validate_new_partition_fields( + simple_table, 1000, 1, 1000, PartitionField(1, 1000, VoidTransform(), "foo_null") + ) + + +@pytest.mark.integration +@pytest.mark.parametrize("catalog", [pytest.lazy_fixture("session_catalog_hive"), pytest.lazy_fixture("session_catalog")]) +def test_add_truncate_generates_default_name(catalog: Catalog, table_schema_simple: Schema) -> None: Review Comment: nit: this is defined twice, remove this one -- 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