| 689 | } |
| 690 | |
| 691 | arrow::Result<FlightClient::DoPutResult> FlightClient::DoPut( |
| 692 | const FlightCallOptions& options, const FlightDescriptor& descriptor, |
| 693 | const std::shared_ptr<Schema>& schema) { |
| 694 | RETURN_NOT_OK(CheckOpen()); |
| 695 | std::unique_ptr<internal::ClientDataStream> remote_stream; |
| 696 | RETURN_NOT_OK(transport_->DoPut(options, &remote_stream)); |
| 697 | std::shared_ptr<internal::ClientDataStream> shared_stream = std::move(remote_stream); |
| 698 | DoPutResult result; |
| 699 | result.reader = std::make_unique<ClientMetadataReader>(shared_stream); |
| 700 | result.writer = std::make_unique<ClientStreamWriter>( |
| 701 | std::move(shared_stream), options.write_options, write_size_limit_bytes_, |
| 702 | descriptor); |
| 703 | RETURN_NOT_OK(result.writer->Begin(schema, options.write_options)); |
| 704 | return result; |
| 705 | } |
| 706 | |
| 707 | arrow::Result<FlightClient::DoExchangeResult> FlightClient::DoExchange( |
| 708 | const FlightCallOptions& options, const FlightDescriptor& descriptor) { |