JingsongLi commented on code in PR #1465:
URL: https://github.com/apache/paimon-rust/pull/1465#discussion_r4662656355
##########
crates/paimon/src/io/file_io.rs:
##########
@@ -110,6 +110,17 @@ pub trait FileIOProvider: std::fmt::Debug + Send + Sync +
'static {
let (op, relative_path) = self.create(path).await?;
Ok((op, relative_path, None))
}
+
+ /// Whether opening a file for writing requires calling `create_dir` on its
+ /// parent directory first.
+ ///
+ /// Defaults to `true` for compatibility with hierarchical backends that
+ /// require parent directories to exist before writing. Providers backed by
+ /// object stores or operators that create missing parent directories on
+ /// write may return `false` to avoid extra directory marker requests.
+ fn requires_parent_dir_for_write(&self) -> bool {
Review Comment:
Is there a reference system for this interface? It looks a bit odd.
##########
crates/paimon/src/io/file_io.rs:
##########
@@ -110,6 +110,17 @@ pub trait FileIOProvider: std::fmt::Debug + Send + Sync +
'static {
let (op, relative_path) = self.create(path).await?;
Ok((op, relative_path, None))
}
+
+ /// Whether opening a file for writing requires calling `create_dir` on its
+ /// parent directory first.
+ ///
+ /// Defaults to `true` for compatibility with hierarchical backends that
+ /// require parent directories to exist before writing. Providers backed by
+ /// object stores or operators that create missing parent directories on
+ /// write may return `false` to avoid extra directory marker requests.
+ fn requires_parent_dir_for_write(&self) -> bool {
Review Comment:
Is there a reference system for this interface? It looks a bit odd. Can we
avoid introducing it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]