You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by fs...@apache.org on 2019/07/05 12:34:25 UTC

[arrow] branch master updated: ARROW-5851: [C++] Fix compilation of reference benchmarks

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

fsaintjacques 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 e6d033f  ARROW-5851: [C++] Fix compilation of reference benchmarks
e6d033f is described below

commit e6d033f77b0380807d1335c7a65191d16437d562
Author: Antoine Pitrou <an...@python.org>
AuthorDate: Fri Jul 5 08:34:09 2019 -0400

    ARROW-5851: [C++] Fix compilation of reference benchmarks
    
    Also fix a warning because of static variables in headers.
    
    Author: Antoine Pitrou <an...@python.org>
    
    Closes #4808 from pitrou/ARROW-5851-compile-reference-benchmarks and squashes the following commits:
    
    fb6740aea <Antoine Pitrou> ARROW-5851:  Fix compilation of reference benchmarks
---
 cpp/src/arrow/flight/internal.cc            |  2 ++
 cpp/src/arrow/flight/internal.h             |  3 ++-
 cpp/src/arrow/flight/types.cc               |  5 +++++
 cpp/src/arrow/flight/types.h                | 12 ++++++++----
 cpp/src/arrow/util/compression-benchmark.cc |  1 +
 5 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/cpp/src/arrow/flight/internal.cc b/cpp/src/arrow/flight/internal.cc
index 5582149..56fc862 100644
--- a/cpp/src/arrow/flight/internal.cc
+++ b/cpp/src/arrow/flight/internal.cc
@@ -42,6 +42,8 @@ namespace arrow {
 namespace flight {
 namespace internal {
 
+const char* kGrpcAuthHeader = "auth-token-bin";
+
 Status FromGrpcStatus(const grpc::Status& grpc_status) {
   if (grpc_status.ok()) {
     return Status::OK();
diff --git a/cpp/src/arrow/flight/internal.h b/cpp/src/arrow/flight/internal.h
index 5283bed..a554e81 100644
--- a/cpp/src/arrow/flight/internal.h
+++ b/cpp/src/arrow/flight/internal.h
@@ -64,7 +64,8 @@ namespace flight {
 namespace internal {
 
 /// The name of the header used to pass authentication tokens.
-static const char* kGrpcAuthHeader = "auth-token-bin";
+ARROW_FLIGHT_EXPORT
+extern const char* kGrpcAuthHeader;
 
 ARROW_FLIGHT_EXPORT
 Status SchemaToString(const Schema& schema, std::string* out);
diff --git a/cpp/src/arrow/flight/types.cc b/cpp/src/arrow/flight/types.cc
index c82e681..86aa223 100644
--- a/cpp/src/arrow/flight/types.cc
+++ b/cpp/src/arrow/flight/types.cc
@@ -31,6 +31,11 @@
 namespace arrow {
 namespace flight {
 
+const char* kSchemeGrpc = "grpc";
+const char* kSchemeGrpcTcp = "grpc+tcp";
+const char* kSchemeGrpcUnix = "grpc+unix";
+const char* kSchemeGrpcTls = "grpc+tls";
+
 bool FlightDescriptor::Equals(const FlightDescriptor& other) const {
   if (type != other.type) {
     return false;
diff --git a/cpp/src/arrow/flight/types.h b/cpp/src/arrow/flight/types.h
index abf894c..b4c4c6c 100644
--- a/cpp/src/arrow/flight/types.h
+++ b/cpp/src/arrow/flight/types.h
@@ -135,10 +135,14 @@ struct ARROW_FLIGHT_EXPORT Ticket {
 class FlightClient;
 class FlightServerBase;
 
-static const char* kSchemeGrpc = "grpc";
-static const char* kSchemeGrpcTcp = "grpc+tcp";
-static const char* kSchemeGrpcUnix = "grpc+unix";
-static const char* kSchemeGrpcTls = "grpc+tls";
+ARROW_FLIGHT_EXPORT
+extern const char* kSchemeGrpc;
+ARROW_FLIGHT_EXPORT
+extern const char* kSchemeGrpcTcp;
+ARROW_FLIGHT_EXPORT
+extern const char* kSchemeGrpcUnix;
+ARROW_FLIGHT_EXPORT
+extern const char* kSchemeGrpcTls;
 
 /// \brief A host location (a URI)
 struct ARROW_FLIGHT_EXPORT Location {
diff --git a/cpp/src/arrow/util/compression-benchmark.cc b/cpp/src/arrow/util/compression-benchmark.cc
index 28bc125..5700b0d 100644
--- a/cpp/src/arrow/util/compression-benchmark.cc
+++ b/cpp/src/arrow/util/compression-benchmark.cc
@@ -25,6 +25,7 @@
 
 #include "arrow/testing/gtest_util.h"
 #include "arrow/util/compression.h"
+#include "arrow/util/logging.h"
 
 namespace arrow {
 namespace util {