Skip to content

Commit 04423b9

Browse files
committed
handled return condition
Returning None based on length of vec for proper message printing
1 parent 8c5f71f commit 04423b9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/storage/staging.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ use std::{
5050
process,
5151
sync::Arc,
5252
};
53-
use tracing::{error, info, warn};
53+
use tracing::{error, info};
5454

5555
const ARROW_FILE_EXTENSION: &str = "data.arrows";
5656
// const PARQUET_FILE_EXTENSION: &str = "data.parquet";
@@ -233,7 +233,12 @@ impl StorageDir {
233233
}
234234
}
235235

236-
Some(schemas)
236+
if schemas.len() > 0 {
237+
Some(schemas)
238+
} else {
239+
None
240+
}
241+
237242
}
238243

239244
fn arrow_path_to_parquet(path: &Path, random_string: String) -> PathBuf {
@@ -282,7 +287,6 @@ pub fn convert_disk_files_to_parquet(
282287

283288
// warn!("staging files-\n{staging_files:?}\n");
284289
for (parquet_path, arrow_files) in staging_files {
285-
warn!("parquet_path-\n{parquet_path:?}");
286290
metrics::STAGING_FILES
287291
.with_label_values(&[stream])
288292
.set(arrow_files.len() as i64);

0 commit comments

Comments
 (0)