You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/02/14 23:11:27 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #4120: Avro: Fix BuildAvroProjection list and map handling to preserve field IDs

rdblue commented on a change in pull request #4120:
URL: https://github.com/apache/iceberg/pull/4120#discussion_r806315422



##########
File path: core/src/main/java/org/apache/iceberg/avro/AvroSchemaUtil.java
##########
@@ -90,6 +90,23 @@ static boolean hasIds(Schema schema) {
     return AvroCustomOrderSchemaVisitor.visit(schema, new HasIds());
   }
 
+  /**
+   * @param schema an Avro Schema
+   * @return true/false based on whether any of the nodes in the provided schema is missing an
+   * ID property recognizable by Iceberg core API. To have an ID recognizable by Iceberg core API:
+   * <ul>
+   *   <li>a field node under struct (record) schema should have {@link FIELD_ID_PROP} property
+   *   <li>an element node under list (array) schema should have {@link ELEMENT_ID_PROP} property
+   *   <li>a pair of key and value node under map schema should have {@link KEY_ID_PROP} and
+   *   {@link VALUE_ID_PROP} respectively
+   *   <li>a primitive node is not assigned any ID related properties
+   * </ul>
+   * @implNote see {@link MissingIds} for more details

Review comment:
       This is an internal class, so it shouldn't be referenced in Javadoc. Anything that is relevant should be noted here since this is the public facing part.




-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org