rdblue commented on a change in pull request #619: Add schema validator
URL: https://github.com/apache/incubator-iceberg/pull/619#discussion_r346984205
 
 

 ##########
 File path: api/src/main/java/org/apache/iceberg/Schema.java
 ##########
 @@ -54,10 +54,14 @@
   public Schema(List<NestedField> columns, Map<String, Integer> aliases) {
     this.struct = StructType.of(columns);
     this.aliasToId = aliases != null ? ImmutableBiMap.copyOf(aliases) : null;
+
+    // validate the schema through IndexByName visitor
+    TypeUtil.indexByName(struct);
 
 Review comment:
   No, I mean to use `TypeUtil.assignFreshIds`.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to