ndrluis commented on issue #751: URL: https://github.com/apache/iceberg-python/issues/751#issuecomment-2132521441
The problem is not with append; it is something occurring when we call model_copy(deep=True) on the metadata object. When I was debugging, I couldn't find where the update was occurring. So, I did a sanity check by creating a table and then calling table.metadata.model_copy(deep=True), and then I was able to reproduce the error. ```python def test_schema_mutation(catalog: SqlCatalog, table_schema_decimal: Schema, random_identifier: Identifier) -> None: database_name, _table_name = random_identifier catalog.create_namespace(database_name) table = catalog.create_table(random_identifier, table_schema_decimal) schema = table.schema() schema_copy = table.metadata.model_copy(deep=True).schemas[0] assert schema == schema_copy ``` Where table_schema_decimal is: ```python Schema( NestedField(field_id=1, name="integer", field_type=IntegerType(), required=True), NestedField(field_id=2, name="decimal_32_2", field_type=DecimalType(32, 2), required=False), NestedField(field_id=3, name="decimal_32_16", field_type=DecimalType(32, 16), required=False), schema_id=0, identifier_field_ids=[1], ) ``` I will continue trying to understand what is happening, but I don't know if some other contributor can help me to understand where the problem is. -- 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