From 91e939b06a73035c37ec1811604f48fb27a45fc7 Mon Sep 17 00:00:00 2001 From: Hang Zheng Date: Tue, 8 Oct 2024 05:00:40 -0400 Subject: [PATCH] according to https://github.com/aws/aws-sdk-cpp/commit/7989e6f3f11e1dabb81f495466522b3d82f91ca7, CompleteMultipartUploadRequest add the SSEC related function after 1.9.201 --- cpp/src/arrow/filesystem/s3_internal.h | 3 +++ cpp/src/arrow/filesystem/s3fs.cc | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/cpp/src/arrow/filesystem/s3_internal.h b/cpp/src/arrow/filesystem/s3_internal.h index 85425b126012a..f63b8850fd9bc 100644 --- a/cpp/src/arrow/filesystem/s3_internal.h +++ b/cpp/src/arrow/filesystem/s3_internal.h @@ -320,6 +320,9 @@ inline Result CalculateSSECustomerKeyMD5( template Status SetSSECustomerKey(S3RequestType& request, const std::string& sse_customer_key) { +#ifdef ARROW_S3_SUPPORT_SSEC + return Status::NotImplemented("SSE-C is not supported"); +#endif if (sse_customer_key.empty()) { return Status::OK(); // do nothing if the sse_customer_key is not configured } diff --git a/cpp/src/arrow/filesystem/s3fs.cc b/cpp/src/arrow/filesystem/s3fs.cc index bb76fd797b4b7..aea17581ecdf5 100644 --- a/cpp/src/arrow/filesystem/s3fs.cc +++ b/cpp/src/arrow/filesystem/s3fs.cc @@ -105,6 +105,10 @@ # define ARROW_S3_HAS_S3CLIENT_CONFIGURATION #endif +#if ARROW_AWS_SDK_VERSION_CHECK(1, 9, 201) +# define ARROW_S3_SUPPORT_SSEC +#endif + #ifdef ARROW_S3_HAS_CRT # include # include