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



##########
File path: parquet/src/main/java/org/apache/iceberg/parquet/ParquetAvro.java
##########
@@ -252,7 +253,7 @@ public Schema record(Schema record, List<String> names, 
List<Schema> types) {
 
         newFields.add(copyField(field, type));
 
-        if (field.schema() != type) {
+        if (!Objects.equal(field.schema(), type)) {

Review comment:
       This was intentionally checking object identity because we want to 
rebuild if anything about the object changed, not just the fields that are used 
for equality. Part of the rationale is that we don't necessarily want to assume 
that `equals` is strict for types. But since we do have strict equality that 
checks all fields (including doc) I think this is fine.




-- 
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to