syun64 opened a new pull request, #441: URL: https://github.com/apache/iceberg-python/pull/441
Similar to the [Java implementation](https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/SchemaUpdate.java#L464), we should update the existing name_mapping on update_schema(). Some changes: - Table.name_mapping no longer defaults to the auto-generated name_mapping based on the current Schema. We should explicitly return None if the property isn't set, so that we can use the function return value to avoid the additional steps in updating the existing name mapping. - I've introduced some changes compared to the Java version. Specifically: - the way it was handling reassigned names had a bug where it wasn't removing all reassigned fields, but only the last one: https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/mapping/MappingUtil.java#L161C11-L161C19 - remove MappedField from MappedFields if the mapped_field.names parameter is an empty list -- 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