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


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveTableUtil.java:
##########
@@ -168,6 +174,31 @@ private static List<DataFile> 
getDataFiles(RemoteIterator<LocatedFileStatus> fil
     return dataFiles;
   }
 
+  public static void appendFiles(URI fromURI, String format, Table icebergTbl, 
boolean isOverwrite, Configuration conf)
+      throws SemanticException {
+    try {
+      Transaction transaction = icebergTbl.newTransaction();
+      if (isOverwrite) {
+        DeleteFiles delete = transaction.newDelete();
+        delete.deleteFromRowFilter(Expressions.alwaysTrue());
+        delete.commit();
+      }
+      AppendFiles append = transaction.newAppend();
+      PartitionSpec spec = icebergTbl.spec();
+      MetricsConfig metricsConfig = 
MetricsConfig.fromProperties(icebergTbl.properties());
+      String nameMappingString = 
icebergTbl.properties().get(TableProperties.DEFAULT_NAME_MAPPING);

Review Comment:
   what's gonna happen if nameMappingString is null? should we simply ignore 
this situation?



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