[ 
https://issues.apache.org/jira/browse/HIVE-25690?focusedWorklogId=681392&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-681392
 ]

ASF GitHub Bot logged work on HIVE-25690:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Nov/21 10:00
            Start Date: 15/Nov/21 10:00
    Worklog Time Spent: 10m 
      Work Description: 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-unsubscr...@hive.apache.org

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 681392)
    Time Spent: 20m  (was: 10m)

> Fix column reorder detection for Iceberg schema evolution
> ---------------------------------------------------------
>
>                 Key: HIVE-25690
>                 URL: https://issues.apache.org/jira/browse/HIVE-25690
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Marton Bod
>            Assignee: Marton Bod
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Current algorithm for detecting schema differences between HMS and Iceberg 
> schema is broken when it comes to column reorders. This patch should fix that 
> up and add more extensive testing.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to