MCPcopy Create free account
hub / github.com/apache/arrow / Validate

Method Validate

cpp/src/arrow/flight/types.cc:875–887  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

873}
874
875Status FlightPayload::Validate() const {
876 static constexpr int64_t kInt32Max = std::numeric_limits<int32_t>::max();
877 if (descriptor && descriptor->size() > kInt32Max) {
878 return Status::CapacityError("Descriptor size overflow (>= 2**31)");
879 }
880 if (app_metadata && app_metadata->size() > kInt32Max) {
881 return Status::CapacityError("app_metadata size overflow (>= 2**31)");
882 }
883 if (ipc_message.body_length > kInt32Max) {
884 return Status::Invalid("Cannot send record batches exceeding 2GiB yet");
885 }
886 return Status::OK();
887}
888
889arrow::Result<BufferVector> FlightPayload::SerializeToBuffers() const {
890 return internal::SerializePayloadToBuffers(*this);

Callers 2

GetPerfBatchesFunction · 0.45
GetPutDataFunction · 0.45

Calls 4

CapacityErrorFunction · 0.85
InvalidFunction · 0.50
OKFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected