You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by ju...@apache.org on 2023/08/01 15:17:03 UTC

[incubator-opendal] 01/01: fix(binding): fix build error

This is an automated email from the ASF dual-hosted git repository.

junouyang pushed a commit to branch dependabot/cargo/object_store-0.6.1
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git

commit a13545cc827740fa5b40c06a81b161ecdfdecbc5
Author: owl <ou...@gmail.com>
AuthorDate: Tue Aug 1 23:16:52 2023 +0800

    fix(binding): fix build error
---
 bindings/object_store/src/lib.rs | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/bindings/object_store/src/lib.rs b/bindings/object_store/src/lib.rs
index f5d89f583..421b6a686 100644
--- a/bindings/object_store/src/lib.rs
+++ b/bindings/object_store/src/lib.rs
@@ -26,6 +26,7 @@ use futures::stream::BoxStream;
 use futures::Stream;
 use futures::StreamExt;
 use object_store::path::Path;
+use object_store::GetOptions;
 use object_store::GetResult;
 use object_store::ListResult;
 use object_store::MultipartId;
@@ -87,6 +88,16 @@ impl ObjectStore for OpendalStore {
         })
     }
 
+    async fn get_opts(&self, location: &Path, _: GetOptions) -> Result<GetResult> {
+        let r = self
+            .inner
+            .reader(location.as_ref())
+            .await
+            .map_err(|err| format_object_store_error(err, location.as_ref()))?;
+
+        Ok(GetResult::Stream(Box::pin(OpendalReader { inner: r })))
+    }
+
     async fn get(&self, location: &Path) -> Result<GetResult> {
         let r = self
             .inner
@@ -118,6 +129,7 @@ impl ObjectStore for OpendalStore {
             location: location.clone(),
             last_modified: meta.last_modified().unwrap_or_default(),
             size: meta.content_length() as usize,
+            e_tag: None,
         })
     }
 
@@ -243,6 +255,7 @@ fn format_object_meta(path: &str, meta: &Metadata) -> ObjectMeta {
         location: path.into(),
         last_modified: meta.last_modified().unwrap_or_default(),
         size: meta.content_length() as usize,
+        e_tag: None,
     }
 }