Skip to content

Commit cce0cb6

Browse files
author
Devdutt Shenoi
committed
log: overwritten arrows file
1 parent 8706176 commit cce0cb6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/parseable/staging/writer.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use arrow_ipc::writer::StreamWriter;
3030
use arrow_schema::Schema;
3131
use arrow_select::concat::concat_batches;
3232
use itertools::Itertools;
33-
use tracing::error;
33+
use tracing::{error, warn};
3434

3535
use crate::{
3636
parseable::{ARROW_FILE_EXTENSION, PART_FILE_EXTENSION},
@@ -81,6 +81,11 @@ impl Drop for DiskWriter {
8181

8282
let mut arrow_path = self.path.to_owned();
8383
arrow_path.set_extension(ARROW_FILE_EXTENSION);
84+
85+
if arrow_path.exists() {
86+
warn!("File {arrow_path:?} exists and will be overwritten");
87+
}
88+
8489
if let Err(err) = std::fs::rename(&self.path, &arrow_path) {
8590
error!("Couldn't rename file {:?}, error = {err}", self.path);
8691
}

0 commit comments

Comments
 (0)