This is an automated email from the ASF dual-hosted git repository.
weibin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-graphar.git
The following commit(s) were added to refs/heads/main by this push:
new c2605130 feat(c++): close arrow::fs::InitializeS3 when arrow version
<15 (#626)
c2605130 is described below
commit c2605130b1ee791eaf597039dd32be0c33d696d5
Author: Liu Jiajun <[email protected]>
AuthorDate: Thu Sep 12 07:32:07 2024 +0800
feat(c++): close arrow::fs::InitializeS3 when arrow version <15 (#626)
Signed-off-by: Liu Jiajun <[email protected]>
---
cpp/src/graphar/filesystem.cc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/cpp/src/graphar/filesystem.cc b/cpp/src/graphar/filesystem.cc
index ca2bbef7..62b9ab2e 100644
--- a/cpp/src/graphar/filesystem.cc
+++ b/cpp/src/graphar/filesystem.cc
@@ -316,6 +316,7 @@ Result<std::shared_ptr<FileSystem>> FileSystemFromUriOrPath(
return std::make_shared<FileSystem>(arrow_fs);
}
+// arrow::fs::InitializeS3 and arrow::fs::FinalizeS3 need arrow_version >= 15
Status InitializeS3() {
#if defined(ARROW_VERSION) && ARROW_VERSION > 14000000
auto options = arrow::fs::S3GlobalOptions::Defaults();
@@ -323,12 +324,16 @@ Status InitializeS3() {
arrow::fs::S3GlobalOptions options;
options.log_level = arrow::fs::S3LogLevel::Fatal;
#endif
+#if defined(ARROW_VERSION) && ARROW_VERSION >= 15000000
RETURN_NOT_ARROW_OK(arrow::fs::InitializeS3(options));
+#endif
return Status::OK();
}
Status FinalizeS3() {
+#if defined(ARROW_VERSION) && ARROW_VERSION >= 15000000
RETURN_NOT_ARROW_OK(arrow::fs::FinalizeS3());
+#endif
return Status::OK();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]