Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,12 @@ public void prepare()
if ("truncate".equalsIgnoreCase(writeMode)) {
if (writeBuilder != null) {
LOG.info("You specify truncate writeMode, begin to clean history data.");
BatchTableWrite write = writeBuilder.withOverwrite().newWrite();
BatchTableCommit commit = writeBuilder.newCommit();
commit.commit(new ArrayList<>());
try {
write.close();
commit.truncateTable();
}
catch (Exception e) {
LOG.error("close paimon write error", e);
LOG.error("Failed to truncate table ", e);
throw new RuntimeException(e);
}
}
Expand Down