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

Function TestEmptyTable

cpp/src/arrow/csv/reader_test.cc:77–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 std::shared_ptr<io::InputStream>)>;
76
77void TestEmptyTable(TableReaderFactory reader_factory) {
78 auto empty_buffer = std::make_shared<Buffer>("");
79 auto empty_input = std::make_shared<io::BufferReader>(empty_buffer);
80 auto maybe_reader =
81 reader_factory(empty_input, ParseOptions::Defaults(), /*block_size=*/{});
82 // Streaming reader fails on open, table readers fail on first read
83 if (maybe_reader.ok()) {
84 ASSERT_FINISHES_AND_RAISES(Invalid, (*maybe_reader)->ReadAsync());
85 } else {
86 ASSERT_TRUE(maybe_reader.status().IsInvalid());
87 }
88}
89
90void TestHeaderOnly(TableReaderFactory reader_factory) {
91 auto header_only_buffer = std::make_shared<Buffer>("a,b,c\n");

Callers 1

TESTFunction · 0.85

Calls 4

DefaultsFunction · 0.50
okMethod · 0.45
ReadAsyncMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected