deniskuzZ commented on code in PR #5123:
URL: https://github.com/apache/hive/pull/5123#discussion_r1532288946


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputCommitter.java:
##########
@@ -544,14 +549,20 @@ private void commitWrite(Table table, String branchName, 
Long snapshotId, long s
    * @param rewritePolicy The rewrite policy to use for the insert overwrite 
commit
    */
   private void commitOverwrite(Table table, String branchName, long startTime, 
FilesForCommit results,
-      RewritePolicy rewritePolicy) {
+      RewritePolicy rewritePolicy, String partitionSpec) {
     Preconditions.checkArgument(results.deleteFiles().isEmpty(), "Can not 
handle deletes with overwrite");
     if (!results.dataFiles().isEmpty()) {
       Transaction transaction = table.newTransaction();
       if (rewritePolicy == RewritePolicy.ALL_PARTITIONS) {
         DeleteFiles delete = transaction.newDelete();
         delete.deleteFromRowFilter(Expressions.alwaysTrue());
         delete.commit();
+      } else if (rewritePolicy == RewritePolicy.SINGLE_PARTITION) {

Review Comment:
   can't we use the DEFAULT? rewrite policy enum is either all or not all 
(custom set)
   so you can simply use `else` without `if`



-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to