Fokko commented on code in PR #12026:
URL: https://github.com/apache/iceberg/pull/12026#discussion_r1925143182


##########
orc/src/main/java/org/apache/iceberg/orc/ORCSchemaUtil.java:
##########
@@ -326,13 +327,20 @@ private static TypeDescription buildOrcProjection(
             orcType = originalType.clone();
           }
         } else {
+          Types.NestedField field = root.findField(fieldId);
           if (isRequired) {
-            throw new IllegalArgumentException(
+            Preconditions.checkArgument(
+                field.initialDefault() != null,
+                "Missing required field: %s (%s)",

Review Comment:
   I agree that the full-column name is most friendly, but I think for the 
other formats, we just give the field name:
   
   
https://github.com/apache/iceberg/blob/8d7ad4a7c94d1755f58d8c5f4fd4040fe4873e32/core/src/main/java/org/apache/iceberg/avro/ValueReaders.java#L263
   
   But that's for another PR



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

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


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

Reply via email to