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