tustvold commented on code in PR #3973:
URL: https://github.com/apache/arrow-rs/pull/3973#discussion_r1151239208


##########
object_store/src/lib.rs:
##########
@@ -371,11 +371,33 @@ pub trait ObjectStore: std::fmt::Display + Send + Sync + 
Debug + 'static {
     ///
     /// Prefixes are evaluated on a path segment basis, i.e. `foo/bar/` is a 
prefix of `foo/bar/x` but not of
     /// `foo/bar_baz/x`.
+    ///
+    /// Note: the order of returned [`ObjectMeta`] is not guaranteed
     async fn list(
         &self,
         prefix: Option<&Path>,
     ) -> Result<BoxStream<'_, Result<ObjectMeta>>>;
 
+    /// List all the objects with the given prefix and a location greater than 
`offset`
+    ///
+    /// Some stores, such as S3 and GCS, may be able to push `offset` down to 
reduce
+    /// the number of network requests required
+    ///
+    /// Note: the order of returned [`ObjectMeta`] is not guaranteed
+    async fn list_with_offset(
+        &self,
+        prefix: Option<&Path>,
+        offset: &Path,
+    ) -> Result<BoxStream<'_, Result<ObjectMeta>>> {
+        let offset = offset.clone();

Review Comment:
   It is possible to construct the lifetimes to avoid this clone, but it seems 
unnecessary given we're likely performing a network call here, the overhead of 
a string clone is not going to be relevant



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