yyanyy commented on a change in pull request #2556:
URL: https://github.com/apache/iceberg/pull/2556#discussion_r628525005
##########
File path: api/src/main/java/org/apache/iceberg/types/TypeUtil.java
##########
@@ -181,10 +183,24 @@ public static Schema assignFreshIds(int schemaId, Schema
schema, NextID nextId)
* @return a structurally identical schema with new ids assigned by the
nextId function
*/
public static Schema assignFreshIds(Schema schema, Schema baseSchema, NextID
nextId) {
- return new Schema(TypeUtil
- .visit(schema.asStruct(), new AssignFreshIds(schema, baseSchema,
nextId))
- .asNestedType()
- .fields());
+ Types.StructType freshSchemaStruct = TypeUtil
Review comment:
I think alias is a bit different here, I think alias is used mostly for
integration purpose from converting a file schema to iceberg schema for easier
lookup (i.e. as a form of helper method), and isn't part of the the iceberg
schema itself and isn't written to table metadata; so I think they may not be
strictly required when constructing new schemas from this class.
--
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]