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

Method TestDoGet

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

Source from the content-addressed store, hash-verified

937 ASSERT_OK(server_->Shutdown());
938}
939void AppMetadataTest::TestDoGet() {
940 Ticket ticket{""};
941 ASSERT_OK_AND_ASSIGN(std::unique_ptr<FlightStreamReader> stream,
942 client_->DoGet(ticket));
943
944 RecordBatchVector expected_batches;
945 ASSERT_OK(ExampleIntBatches(&expected_batches));
946
947 auto num_batches = static_cast<int>(expected_batches.size());
948 for (int i = 0; i < num_batches; ++i) {
949 ASSERT_OK_AND_ASSIGN(auto chunk, stream->Next());
950 ASSERT_NE(nullptr, chunk.data);
951 ASSERT_NE(nullptr, chunk.app_metadata);
952 ASSERT_BATCHES_EQUAL(*expected_batches[i], *chunk.data);
953 ASSERT_EQ(std::to_string(i), chunk.app_metadata->ToString());
954 }
955 ASSERT_OK_AND_ASSIGN(auto chunk, stream->Next());
956 ASSERT_EQ(nullptr, chunk.data);
957}
958// Test dictionaries. This tests a corner case in the reader:
959// dictionary batches come in between the schema and the first record
960// batch, so the server must take care to read application metadata

Callers

nothing calls this directly

Calls 10

ExampleIntBatchesFunction · 0.85
to_stringFunction · 0.85
CheckBuffersOnDeviceFunction · 0.85
AssertBatchesEqualFunction · 0.85
ASSERT_OK_AND_ASSIGNFunction · 0.70
DoGetMethod · 0.45
sizeMethod · 0.45
ToStringMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected