rdblue commented on code in PR #7699:
URL: https://github.com/apache/iceberg/pull/7699#discussion_r1209493059


##########
python/pyiceberg/avro/resolver.py:
##########
@@ -150,8 +152,12 @@ def struct(self, struct: StructType, expected_struct: 
Optional[IcebergType], fie
             if read_field.field_id not in file_fields:
                 if read_field.required:
                     raise ResolveError(f"{read_field} is non-optional, and not 
part of the file schema")
-                # Just set the new field to None
-                results.append((pos, NoneReader()))

Review Comment:
   If the initial default is present, then the field _can_ be required. It is 
valid to add a new required field as long as it has a non-null initial default.



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

Reply via email to