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

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

                Author: ASF GitHub Bot
            Created on: 26/Apr/21 13:08
            Start Date: 26/Apr/21 13:08
    Worklog Time Spent: 10m 
      Work Description: marton-bod commented on a change in pull request #2219:
URL: https://github.com/apache/hive/pull/2219#discussion_r620279270



##########
File path: 
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerWithEngine.java
##########
@@ -955,4 +1046,44 @@ private void validateBasicStats(Table icebergTable, 
String dbName, String tableN
       Assert.assertEquals(summary.get(entry.getValue()), 
hmsParams.get(entry.getKey()));
     }
   }
+
+  private void validateMigration(String tableName, int recordCount) {
+    List<Object[]> originalResult = shell.executeStatement("SELECT * FROM " + 
tableName + " ORDER BY a");
+    Assert.assertEquals(recordCount, originalResult.size());
+    List<Object[]> originalDescribe = shell.executeStatement("DESCRIBE 
FORMATTED " + tableName);
+    validateDescribeOutput(originalDescribe, fileFormat.name());
+    shell.executeStatement("ALTER TABLE " + tableName + " SET TBLPROPERTIES " +
+        
"('storage_handler'='org.apache.iceberg.mr.hive.HiveIcebergStorageHandler')");
+    List<Object[]> alterResult = shell.executeStatement("SELECT * FROM " + 
tableName + " ORDER BY a");
+    Assert.assertEquals(originalResult.size(), alterResult.size());
+    List<Object[]> alterDescribe = shell.executeStatement("DESCRIBE FORMATTED 
" + tableName);

Review comment:
       Can we use `TestHiveMetastore#loadTable` instead and check the contents 
of the `sd`?




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


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

    Worklog Id:     (was: 589234)
    Time Spent: 2.5h  (was: 2h 20m)

> Implement rollback for hive to iceberg migration
> ------------------------------------------------
>
>                 Key: HIVE-25057
>                 URL: https://issues.apache.org/jira/browse/HIVE-25057
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: László Pintér
>            Assignee: László Pintér
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> This is a follow-up Jira of HIVE-25008.
> In case of an error during hive to iceberg migration, the original hive table 
> must be restored. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to