Skip to content

Commit

Permalink
[Improve][Connector-V2] Reduce the request times of iceberg load table (
Browse files Browse the repository at this point in the history
  • Loading branch information
Hisoka-X authored Nov 27, 2024
1 parent 399eabc commit 555f5eb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class IcebergAggregatedCommitter
private final IcebergFilesCommitter filesCommitter;

public IcebergAggregatedCommitter(SinkConfig config, CatalogTable catalogTable) {
IcebergTableLoader tableLoader = IcebergTableLoader.create(config, catalogTable).open();
IcebergTableLoader tableLoader = IcebergTableLoader.create(config, catalogTable);
this.filesCommitter = IcebergFilesCommitter.of(config, tableLoader);
}

Expand All @@ -51,7 +51,8 @@ public List<IcebergAggregatedCommitInfo> commit(

private void commitFiles(List<IcebergCommitInfo> commitInfos) {
for (IcebergCommitInfo icebergCommitInfo : commitInfos) {
if (icebergCommitInfo.getResults() == null) {
if (icebergCommitInfo.getResults() == null
|| icebergCommitInfo.getResults().isEmpty()) {
continue;
}
filesCommitter.doCommit(icebergCommitInfo.getResults());
Expand Down

0 comments on commit 555f5eb

Please sign in to comment.