crepererum commented on code in PR #548:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/548#discussion_r2548846965


##########
src/lib.rs:
##########
@@ -1756,6 +1761,73 @@ pub struct PutResult {
     pub version: Option<String>,
 }
 
+/// Configure preconditions for the copy operation
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
+pub enum CopyMode {
+    /// Perform an atomic write operation, overwriting any object present at 
the provided path
+    #[default]
+    Overwrite,
+    /// Perform an atomic write operation, returning [`Error::AlreadyExists`] 
if an
+    /// object already exists at the provided path
+    Create,
+}
+
+/// Options for a copy request
+#[derive(Debug, Clone, Default)]
+pub struct CopyOptions {
+    /// Configure the [`CopyMode`] for this operation
+    pub mode: CopyMode,

Review Comment:
   I cannot square the circle here: having a simple API (esp. not having 
hundreds of specialized methods or traits) + no breaking change is IMHO not 
gonna work. TBH I don't see what's the reason for avoiding breaking changes, 
it's a 0.x crate after all. And it's the question of "how much breaking" it is. 
We're not re-designing the entire interface for that again.
   
   Different example: if we would add "attributes" to the copy operation (which 
might be actually happening at one point), then a store implementation HAS TO 
consider them. You cannot just YOLO it and drop that information to the floor. 
Hence, this would be a breaking change, not only because of the interface 
change, but purely based on the fact that there's a semantic change/addition to 
the operation that implementation HAVE TO consider.



-- 
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]

Reply via email to