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/06/07 09:18:13 UTC

[GitHub] [hive] marton-bod commented on a change in pull request #2351: HIVE-25200: Alter table add columns support for Iceberg tables

marton-bod commented on a change in pull request #2351:
URL: https://github.com/apache/hive/pull/2351#discussion_r646413108



##########
File path: iceberg/iceberg-catalog/src/main/java/org/apache/iceberg/hive/HiveSchemaUtil.java
##########
@@ -134,6 +136,28 @@ public static Type convert(TypeInfo typeInfo) {
     return HiveSchemaConverter.convert(typeInfo, false);
   }
 
+  /**
+   * Produces the difference of two FieldSchema lists by only taking into account the field name and type.
+   * @param from List of fields to subtract from
+   * @param to List of fields to subtract
+   * @return the result list of difference
+   */
+  public static List<FieldSchema> schemaDifference(List<FieldSchema> from, List<FieldSchema> to) {

Review comment:
       These parameter names suggest to me that `to` represent some destination collection, and `from` is the source collection. Can we rename them a bit? Maybe something like `baseFields` and `fieldsToRemove`?




-- 
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: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org