You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/11/15 10:00:38 UTC

[GitHub] [hive] szlta commented on a change in pull request #2779: HIVE-25690: Fix column reorder detection for Iceberg schema evolution

szlta commented on a change in pull request #2779:
URL: https://github.com/apache/hive/pull/2779#discussion_r749167302



##########
File path: iceberg/iceberg-catalog/src/main/java/org/apache/iceberg/hive/HiveSchemaUtil.java
##########
@@ -178,28 +179,57 @@ public static SchemaDifference getSchemaDiff(Collection<FieldSchema> minuendColl
   }
 
   /**
-   * Compares a list of columns to another list, by name, to find an out of order column.
-   * It iterates through updated one by one, and compares the name of the column to the name of the column in the old
-   * list, in the same position. It returns the first mismatch it finds in updated, if any.
+   * Compares two lists of columns to each other, by name and index, to find the column that was moved by the
+   * schema evolution update (i.e. a column which was either moved to the first position, or moved after some specified
+   * column).

Review comment:
       Looks good to me. Perhaps we could emphasise that this only supports 1 col being reordered. In Hive with REPLACE COLUMNS statement one could achieve mass reorders so let's try and scare away anyone in the future trying to use this method for that statement :D 




-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org