From a014fee827757035d090c25faac7263021ea9286 Mon Sep 17 00:00:00 2001 From: Fred Storage Liu Date: Tue, 2 Apr 2024 11:50:46 -0700 Subject: [PATCH] [DeletionVectorsSuite] Delete commit json then write the new json (#2836) #### Which Delta project/connector is this regarding? - [ ] Spark - [ ] Standalone - [ ] Flink - [ ] Kernel - [ ] Other (fill in here) ## Description Delete commit json then write the new json as env may cannot overwrite file. ## How was this patch tested? UT --- .../spark/sql/delta/deletionvectors/DeletionVectorsSuite.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/spark/src/test/scala/org/apache/spark/sql/delta/deletionvectors/DeletionVectorsSuite.scala b/spark/src/test/scala/org/apache/spark/sql/delta/deletionvectors/DeletionVectorsSuite.scala index 4bd3441621e..7cf670d284f 100644 --- a/spark/src/test/scala/org/apache/spark/sql/delta/deletionvectors/DeletionVectorsSuite.scala +++ b/spark/src/test/scala/org/apache/spark/sql/delta/deletionvectors/DeletionVectorsSuite.scala @@ -828,6 +828,7 @@ object DeletionVectorsSuite { val logJsonContent = FileUtils.readFileToString(logJson, "UTF-8") val newLogJsonContent = logJsonContent.replace( "{{FOLDER_WITH_SPECIAL_CHAR}}", fullPath) + FileUtils.delete(logJson) FileUtils.write(logJson, newLogJsonContent, "UTF-8") } }