rdblue commented on code in PR #6004:
URL: https://github.com/apache/iceberg/pull/6004#discussion_r1002769332
##########
core/src/main/java/org/apache/iceberg/avro/ValueReaders.java:
##########
@@ -612,6 +615,9 @@ protected StructReader(
} else if (field.fieldId() == MetadataColumns.IS_DELETED.fieldId()) {
positionList.add(pos);
constantList.add(false);
+ } else if (record.getField(field.name()) == null &&
field.initialDefault() != null) {
Review Comment:
I think the reason for leaving out the field in `BuildAvroProjection` was to
make this check work. But I'm pretty sure that the Avro Schema needs to match
the Iceberg Schema. So this will probably need to have some other way of
detecting that the field will not be read from the field because it was missing
from the file schema.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]