Skip to content

Commit

Permalink
[DeletionVectorsSuite] Delete commit json then write the new json (de…
Browse files Browse the repository at this point in the history
…lta-io#2836)

<!--
Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, please read our contributor guidelines:
https://github.com/delta-io/delta/blob/master/CONTRIBUTING.md
2. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]
Your PR title ...'.
  3. Be sure to keep the PR description updated to reflect all changes.
  4. Please write your PR title to summarize what this PR proposes.
5. If possible, provide a concise example to reproduce the issue for a
faster review.
6. If applicable, include the corresponding issue number in the PR title
and link it in the body.
-->

#### Which Delta project/connector is this regarding?
<!--
Please add the component selected below to the beginning of the pull
request title
For example: [Spark] Title of my pull request
-->

- [ ] 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
  • Loading branch information
lzlfred authored Apr 2, 2024
1 parent b3de6c2 commit a014fee
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

0 comments on commit a014fee

Please sign in to comment.