This is an automated email from the ASF dual-hosted git repository.
ayushsaxena pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 843168bfabe HIVE-29529: Iceberg: Load table from cache
HiveIcebergOutputCommitter (#6394)
843168bfabe is described below
commit 843168bfabe01a3c07275626445d83cea560df32
Author: Ayush Saxena <[email protected]>
AuthorDate: Wed Apr 1 09:55:30 2026 +0530
HIVE-29529: Iceberg: Load table from cache HiveIcebergOutputCommitter
(#6394)
---
.../iceberg/mr/hive/HiveIcebergOutputCommitter.java | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git
a/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputCommitter.java
b/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputCommitter.java
index 41b3be6c942..9fabe10488b 100644
---
a/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputCommitter.java
+++
b/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputCommitter.java
@@ -440,9 +440,9 @@ private void commitTable(FileIO io, ExecutorService
executor, OutputTable output
for (JobContext jobContext : jobContexts) {
JobConf conf = jobContext.getJobConf();
- table = Optional.ofNullable(table).orElseGet(() ->
Catalogs.loadTable(conf, catalogProperties));
+ 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);
if (filterExpr == null) {
filterExpr = SessionStateUtil.getConflictDetectionFilter(conf,
catalogProperties.get(Catalogs.NAME))
@@ -518,15 +518,8 @@ private void commitTable(FileIO io, ExecutorService
executor, OutputTable output
}
private Long getSnapshotId(Table table, String branchName) {
- // Use the transaction table (if available) so that intra-txn changes
- // (e.g. a prior INSERT) don't cause false conflict validation failures.
- Table snapshotTable =
Optional.ofNullable(IcebergAcidUtil.getTransaction(table))
- .map(Transaction::table)
- .orElse(table);
-
- return
Optional.ofNullable(IcebergTableUtil.getTableSnapshot(snapshotTable,
branchName))
- .map(Snapshot::snapshotId)
- .orElse(null);
+ Snapshot snapshot = IcebergTableUtil.getTableSnapshot(table, branchName);
+ return
Optional.ofNullable(snapshot).map(Snapshot::snapshotId).orElse(null);
}
/**