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 2021/06/18 21:03:32 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #2714: Use equals() instead of Ref. equality

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:
users@infra.apache.org



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