Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions cpp/src/arrow/flight/test-util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions cpp/src/arrow/flight/test-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/arrow/flight/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand All @@ -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_;
Expand Down
5 changes: 3 additions & 2 deletions format/Flight.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand Down