You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by bl...@apache.org on 2019/01/14 21:45:40 UTC

[incubator-iceberg] branch master updated: Update struct fields for doc-only changes. (#66)

This is an automated email from the ASF dual-hosted git repository.

blue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iceberg.git


The following commit(s) were added to refs/heads/master by this push:
     new 18c8c1e  Update struct fields for doc-only changes. (#66)
18c8c1e is described below

commit 18c8c1e459cb2d9d61d751630d4aad08020a8a01
Author: Ryan Blue <rd...@users.noreply.github.com>
AuthorDate: Mon Jan 14 13:45:36 2019 -0800

    Update struct fields for doc-only changes. (#66)
---
 core/src/main/java/com/netflix/iceberg/SchemaUpdate.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/core/src/main/java/com/netflix/iceberg/SchemaUpdate.java b/core/src/main/java/com/netflix/iceberg/SchemaUpdate.java
index 65e7839..4e7f290 100644
--- a/core/src/main/java/com/netflix/iceberg/SchemaUpdate.java
+++ b/core/src/main/java/com/netflix/iceberg/SchemaUpdate.java
@@ -30,6 +30,7 @@ import com.netflix.iceberg.types.Types;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 
 import static com.netflix.iceberg.types.Types.NestedField.optional;
 import static com.netflix.iceberg.types.Types.NestedField.required;
@@ -261,7 +262,9 @@ class SchemaUpdate implements UpdateSchema {
           doc = update.doc();
         }
 
-        if (!name.equals(field.name()) || field.type() != resultType) {
+        if (!name.equals(field.name()) ||
+            field.type() != resultType ||
+            !Objects.equals(doc, field.doc())) {
           hasChange = true;
           if (field.isOptional()) {
             newFields.add(optional(field.fieldId(), name, resultType, doc));