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

Function TestEmptyTable

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

Source from the content-addressed store, hash-verified

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