Skip to content

Commit 2796881

Browse files
committed
wip
1 parent 8a08774 commit 2796881

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

crates/iceberg/src/writer/file_writer/location_generator.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ use crate::{Error, ErrorKind, Result};
2626

2727
/// LocationGenerator will generate a file location for the writer.
2828
pub trait LocationGenerator: Send + Sync + 'static {
29-
/// Generate a related file location for the writer.
30-
fn generate_name(&self) -> String;
29+
/// Generate a full file location for the writer.
30+
fn generate_name(&self, file_name: &str) -> String;
31+
32+
///
33+
fn generate_name_with_extra_dir(&self, extra_dir: &str, file_name: &str) -> String {
34+
self.generate_name(&format!("{}/{}", extra_dir, file_name))
35+
}
3136
}
3237

3338
const DEFAULT_FILE_FORMAT: &str = "write.format.default";

0 commit comments

Comments
 (0)