openinx commented on a change in pull request #2556:
URL: https://github.com/apache/iceberg/pull/2556#discussion_r628669046
##########
File path: api/src/main/java/org/apache/iceberg/types/TypeUtil.java
##########
@@ -213,7 +224,7 @@ public static Schema assignIncreasingFreshIds(Schema
schema) {
*/
public static Schema reassignIds(Schema schema, Schema idSourceSchema) {
Types.StructType struct = visit(schema, new
ReassignIds(idSourceSchema)).asStructType();
- return new Schema(struct.fields());
+ return new Schema(struct.fields(), refreshIdentifierFields(struct,
schema));
Review comment:
I would prefer to call `refreshIdentifierFields` here to get an
consistent view of identifier field id list for the `schema`, without caring
about the idsourceSchema’s own identifier field id list. This makes the
`reassignIds` method looks more general.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]