This is an automated email from the ASF dual-hosted git repository.
apitrou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 6d9a6a4a4c MINOR: [C++] Fix MSVC compiler error (#13795)
6d9a6a4a4c is described below
commit 6d9a6a4a4c34b6e4c62dc5bb91391d1805ee4d1d
Author: Antoine Pitrou <[email protected]>
AuthorDate: Thu Aug 4 14:13:49 2022 +0200
MINOR: [C++] Fix MSVC compiler error (#13795)
Downcast explicitly from double to long.
This fixes a regression introduced in ARROW-16521.
Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
---
cpp/src/arrow/filesystem/s3fs.cc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/cpp/src/arrow/filesystem/s3fs.cc b/cpp/src/arrow/filesystem/s3fs.cc
index aafb9a7cbf..5f601db5e9 100644
--- a/cpp/src/arrow/filesystem/s3fs.cc
+++ b/cpp/src/arrow/filesystem/s3fs.cc
@@ -721,10 +721,12 @@ class ClientBuilder {
}
if (options_.request_timeout > 0) {
// Use ceil() to avoid setting it to 0 as that probably means no timeout.
- client_config_.requestTimeoutMs = ceil(options_.request_timeout * 1000);
+ client_config_.requestTimeoutMs =
+ static_cast<long>(ceil(options_.request_timeout * 1000)); // NOLINT
runtime/int
}
if (options_.connect_timeout > 0) {
- client_config_.connectTimeoutMs = ceil(options_.connect_timeout * 1000);
+ client_config_.connectTimeoutMs =
+ static_cast<long>(ceil(options_.connect_timeout * 1000)); // NOLINT
runtime/int
}
client_config_.endpointOverride = ToAwsString(options_.endpoint_override);