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

Method TestDoExchangeClientWriteOptions

cpp/src/arrow/flight/test_definitions.cc:1142–1158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1140 }
1141}
1142void IpcOptionsTest::TestDoExchangeClientWriteOptions() {
1143 // Call DoExchange and write nested data, but with a very low nesting depth set to
1144 // fail the call.
1145 auto options = FlightCallOptions();
1146 options.write_options.max_recursion_depth = 1;
1147 auto descr = FlightDescriptor::Command("");
1148 ASSERT_OK_AND_ASSIGN(auto do_exchange_result, client_->DoExchange(options, descr));
1149 std::unique_ptr<FlightStreamWriter> writer = std::move(do_exchange_result.writer);
1150 RecordBatchVector batches;
1151 ASSERT_OK(ExampleNestedBatches(&batches));
1152 ASSERT_OK(writer->Begin(batches[0]->schema()));
1153 for (const auto& batch : batches) {
1154 ASSERT_RAISES(Invalid, writer->WriteRecordBatch(*batch));
1155 }
1156 ASSERT_OK(writer->DoneWriting());
1157 ASSERT_OK(writer->Close());
1158}
1159void IpcOptionsTest::TestDoExchangeClientWriteOptionsBegin() {
1160 // Call DoExchange and write nested data, but with a very low nesting depth set to
1161 // fail the call. Here the options are set explicitly when we write data and not in the

Callers

nothing calls this directly

Calls 8

FlightCallOptionsClass · 0.85
ExampleNestedBatchesFunction · 0.85
DoneWritingMethod · 0.80
CommandFunction · 0.70
BeginMethod · 0.45
schemaMethod · 0.45
WriteRecordBatchMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected