Skip to content

Commit

Permalink
[spark] Purge file need refresh table avoid FileNotFound (apache#4809)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzifu666 authored Jan 1, 2025
1 parent aa08553 commit 18f46f7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public InternalRow[] call(InternalRow args) {
throw new RuntimeException(e);
}
});
spark().catalog().refreshTable(table.fullName());
} catch (IOException e) {
throw new RuntimeException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class PurgeFilesProcedureTest extends PaimonSparkTestBase {
spark.sql("CALL paimon.sys.purge_files(table => 'test.T')")
checkAnswer(spark.sql("select * from test.T"), Nil)

spark.sql("refresh table test.T");
spark.sql("insert into T select '2', 'aa'");
checkAnswer(spark.sql("select * from test.T"), Row("2", "aa") :: Nil)
}
Expand Down

0 comments on commit 18f46f7

Please sign in to comment.