From a0cf23d3c160f6262579a6fba4374b8f258b513a Mon Sep 17 00:00:00 2001 From: Shingo OKAWA Date: Sun, 28 May 2023 04:25:18 +0900 Subject: [PATCH] Add list_with_offset to DeltaObjectStore Signed-off-by: Shingo OKAWA --- rust/src/storage/mod.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/rust/src/storage/mod.rs b/rust/src/storage/mod.rs index 8cd744a99e..422ecedadf 100644 --- a/rust/src/storage/mod.rs +++ b/rust/src/storage/mod.rs @@ -236,6 +236,18 @@ impl ObjectStore for DeltaObjectStore { self.storage.list(prefix).await } + /// 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 + async fn list_with_offset( + &self, + prefix: Option<&Path>, + offset: &Path, + ) -> ObjectStoreResult>> { + self.storage.list_with_offset(prefix, offset).await + } + /// List objects with the given prefix and an implementation specific /// delimiter. Returns common prefixes (directories) in addition to object /// metadata.