You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ks...@apache.org on 2019/02/15 13:41:06 UTC
[arrow] branch master updated: ARROW-4474: Use signed integers in
FlightInfo payload size fields
This is an automated email from the ASF dual-hosted git repository.
kszucs 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 09cb71c ARROW-4474: Use signed integers in FlightInfo payload size fields
09cb71c is described below
commit 09cb71c7a02b23ad685709062a93576abe336b1f
Author: David Li <li...@gmail.com>
AuthorDate: Fri Feb 15 14:40:50 2019 +0100
ARROW-4474: Use signed integers in FlightInfo payload size fields
Author: David Li <li...@gmail.com>
Closes #3555 from lihalite/arrow-4474 and squashes the following commits:
36ed4df3 <David Li> Use signed integers in FlightInfo payload size fields
---
cpp/src/arrow/flight/test-util.cc | 5 ++---
cpp/src/arrow/flight/test-util.h | 5 ++---
cpp/src/arrow/flight/types.h | 8 ++++----
format/Flight.proto | 5 +++--
4 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/cpp/src/arrow/flight/test-util.cc b/cpp/src/arrow/flight/test-util.cc
index 7b8a7f3..becad1b 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<FlightEndpoint>& endpoints,
- uint64_t total_records, uint64_t total_bytes,
- FlightInfo::Data* out) {
+ const std::vector<FlightEndpoint>& 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 f955e3d..006c966 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<Schema> ExampleSchema2() {
ARROW_EXPORT
Status MakeFlightInfo(const Schema& schema, const FlightDescriptor& descriptor,
- const std::vector<FlightEndpoint>& endpoints,
- uint64_t total_records, uint64_t total_bytes,
- FlightInfo::Data* out);
+ const std::vector<FlightEndpoint>& endpoints, int64_t total_records,
+ int64_t total_bytes, FlightInfo::Data* out);
ARROW_EXPORT
std::vector<FlightInfo> ExampleFlightInfo();
diff --git a/cpp/src/arrow/flight/types.h b/cpp/src/arrow/flight/types.h
index e4251bd..6db2655 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<FlightEndpoint> 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<FlightEndpoint>& 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 219045b..3a6ae80 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;
}
/*