chenjunjiedada commented on a change in pull request #830: Support name mapping resolution for parquet URL: https://github.com/apache/incubator-iceberg/pull/830#discussion_r405208699
########## File path: parquet/src/main/java/org/apache/iceberg/parquet/ParquetSchemaUtil.java ########## @@ -87,29 +82,21 @@ public static boolean hasIds(MessageType fileSchema) { // Try to convert the type to Iceberg. If an ID assignment is needed, return false. ParquetTypeVisitor.visit(fileSchema, new MessageTypeToType(fileSchema) { @Override - protected int nextId() { - throw new IllegalStateException("Needed to assign ID"); + protected int getId(org.apache.parquet.schema.Type type) { + org.apache.parquet.schema.Type.ID id = type.getId(); + if (id != null) { + throw new IllegalStateException("at least one ID exists"); Review comment: Did I misunderstand the comment? I thought you meant file schema either has all columns with IDs or do not. Do you mean that a file schema can have some of the columns with IDs and some without ID? > This also needs to update ParquetSchemaUtil.hasIds so that any ID causes it to return true, instead of any missing ID. This should be okay since files either have IDs or do not, so it is not a behavior change. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org