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


##########
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:
   My point was that one of the stated  rationales for extracting options into 
`CopyOptions` is to help enable
   - https://github.com/apache/arrow-rs-object-store/issues/297
   
   However, it seems like if we go with this API we will not be able to add 
fields to CopyOptions to enable cross bucket copying without another breaking 
API change
   
   Perhaps I am missing something



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