ayushtkn commented on code in PR #6394:
URL: https://github.com/apache/hive/pull/6394#discussion_r3014187465


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputCommitter.java:
##########
@@ -442,7 +442,7 @@ private void commitTable(FileIO io, ExecutorService 
executor, OutputTable output
 
       table = Optional.ofNullable(table).orElseGet(() -> 
IcebergTableUtil.getTable(conf, catalogProperties));
       branchName = conf.get(InputFormatConfig.OUTPUT_TABLE_SNAPSHOT_REF);
-      snapshotId = getSnapshotId(outputTable.table, branchName);
+      snapshotId = getSnapshotId(table, branchName);

Review Comment:
   yes, `outputTable` is used to load the the `table`, get the name & all
   ```
       String name = outputTable.tableName;
   
       Properties catalogProperties = new Properties();
       catalogProperties.put(Catalogs.NAME, name);
       catalogProperties.put(Catalogs.LOCATION, outputTable.table.location());
   
       if (outputTable.catalogName != null) {
         catalogProperties.put(InputFormatConfig.CATALOG_NAME, 
outputTable.catalogName);
       }
   ```
   
   It would have stayed same I believe always or in most cases atleast the 
values, but not in case of multi statement commits, which persists the 
transaction logic.
   
   I debugged the `table` has the new commits part of the multi statement 
commits, but ``outputTable.table` didn't



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

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to