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

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

                Author: ASF GitHub Bot
            Created on: 10/Jun/21 08:01
            Start Date: 10/Jun/21 08:01
    Worklog Time Spent: 10m 
      Work Description: pvary commented on a change in pull request #2359:
URL: https://github.com/apache/hive/pull/2359#discussion_r648945777



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveStorageHandler.java
##########
@@ -263,4 +264,23 @@ default boolean supportsPartitionTransform() {
   default String getFileFormatPropertyKey() {
     return null;
   }
+
+  /**
+   * Check if we should use the {@link #nativeCommit(Properties, boolean)} 
method for committing inserts instead of
+   * using file copy in the {@link org.apache.hadoop.hive.ql.exec.MoveTask}-s.
+   * @return
+   */
+  default boolean useNativeCommit() {
+    return false;
+  }
+
+  /**
+   * Commits the inserts for the non-native tables. Used in the {@link 
org.apache.hadoop.hive.ql.exec.MoveTask}.

Review comment:
       What do you think about these names?
   ```
     /**
      * Checks if we should keep the {@link 
org.apache.hadoop.hive.ql.exec.MoveTask} and use the
      * {@link #storageHandlerCommit(Properties, boolean)} method for 
committing inserts instead of
      * {@link 
org.apache.hadoop.hive.metastore.DefaultHiveMetaHook#commitInsertTable(Table, 
boolean)}.
      * @return Returns true if we should use the {@link 
#storageHandlerCommit(Properties, boolean)} method
      */
     default boolean keepMoveTask() {
       return false;
     }
   
     /**
      * Commits the inserts for the non-native tables. Used in the {@link 
org.apache.hadoop.hive.ql.exec.MoveTask}.
      * @param commitProperties Commit properties which are needed for the 
handler based commit
      * @param overwrite If this is an INSERT OVERWRITE then it is true
      * @throws HiveException If there is an error during commit
      */
     default void storageHandlerCommit(Properties commitProperties, boolean 
overwrite) throws HiveException {
       throw new UnsupportedOperationException();
     }
   ```




-- 
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: 609547)
    Time Spent: 1h 50m  (was: 1h 40m)

> Refactor Iceberg commit to the MoveTask/MoveWork
> ------------------------------------------------
>
>                 Key: HIVE-25208
>                 URL: https://issues.apache.org/jira/browse/HIVE-25208
>             Project: Hive
>          Issue Type: Improvement
>          Components: Hive
>            Reporter: Peter Vary
>            Assignee: Peter Vary
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Instead of committing Iceberg changes in `DefaultMetaHook.preCommitInsert` we 
> should commit in MoveWork so we are using the same flow as normal tables.



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

Reply via email to