diff --git a/cpp/src/arrow/flight/test-util.cc b/cpp/src/arrow/flight/test-util.cc index 7b8a7f33cb8..becad1bf42e 100644 --- a/cpp/src/arrow/flight/test-util.cc +++ b/cpp/src/arrow/flight/test-util.cc @@ -119,9 +119,8 @@ bool TestServer::IsRunning() { return server_process_->running(); } int TestServer::port() const { return port_; } Status MakeFlightInfo(const Schema& schema, const FlightDescriptor& descriptor, - const std::vector& endpoints, - uint64_t total_records, uint64_t total_bytes, - FlightInfo::Data* out) { + const std::vector& endpoints, int64_t total_records, + int64_t total_bytes, FlightInfo::Data* out) { out->descriptor = descriptor; out->endpoints = endpoints; out->total_records = total_records; diff --git a/cpp/src/arrow/flight/test-util.h b/cpp/src/arrow/flight/test-util.h index f955e3d7137..006c966c377 100644 --- a/cpp/src/arrow/flight/test-util.h +++ b/cpp/src/arrow/flight/test-util.h @@ -102,9 +102,8 @@ inline std::shared_ptr ExampleSchema2() { ARROW_EXPORT Status MakeFlightInfo(const Schema& schema, const FlightDescriptor& descriptor, - const std::vector& endpoints, - uint64_t total_records, uint64_t total_bytes, - FlightInfo::Data* out); + const std::vector& endpoints, int64_t total_records, + int64_t total_bytes, FlightInfo::Data* out); ARROW_EXPORT std::vector ExampleFlightInfo(); diff --git a/cpp/src/arrow/flight/types.h b/cpp/src/arrow/flight/types.h index e4251bdd5d2..6db2655ef6c 100644 --- a/cpp/src/arrow/flight/types.h +++ b/cpp/src/arrow/flight/types.h @@ -119,8 +119,8 @@ class FlightInfo { std::string schema; FlightDescriptor descriptor; std::vector endpoints; - uint64_t total_records; - uint64_t total_bytes; + int64_t total_records; + int64_t total_bytes; }; explicit FlightInfo(const Data& data) : data_(data), reconstructed_schema_(false) {} @@ -141,10 +141,10 @@ class FlightInfo { const std::vector& endpoints() const { return data_.endpoints; } /// The total number of records (rows) in the dataset. If unknown, set to -1 - uint64_t total_records() const { return data_.total_records; } + int64_t total_records() const { return data_.total_records; } /// The total number of bytes in the dataset. If unknown, set to -1 - uint64_t total_bytes() const { return data_.total_bytes; } + int64_t total_bytes() const { return data_.total_bytes; } private: Data data_; diff --git a/format/Flight.proto b/format/Flight.proto index 219045b291c..3a6ae80ee25 100644 --- a/format/Flight.proto +++ b/format/Flight.proto @@ -230,8 +230,9 @@ message FlightGetInfo { */ repeated FlightEndpoint endpoint = 3; - uint64 total_records = 4; - uint64 total_bytes = 5; + // Set these to -1 if unknown. + int64 total_records = 4; + int64 total_bytes = 5; } /*