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

Function MakeColumnParser

cpp/src/arrow/csv/test_common.cc:52–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void MakeColumnParser(std::vector<std::string> items, std::shared_ptr<BlockParser>* out) {
53 auto options = ParseOptions::Defaults();
54 // Need this to test for null (empty) values
55 options.ignore_empty_lines = false;
56 std::vector<std::string> lines;
57 for (const auto& item : items) {
58 lines.push_back(item + '\n');
59 }
60 MakeCSVParser(lines, options, 1, default_memory_pool(), out);
61 ASSERT_EQ((*out)->num_cols(), 1) << "Should have seen only 1 CSV column";
62 ASSERT_EQ((*out)->num_rows(), items.size());
63}
64
65namespace {
66

Callers 5

InsertChunkMethod · 0.85
AssertChunkMethod · 0.85
AssertChunkInvalidMethod · 0.85
AssertBuildingMethod · 0.85
TEST_FFunction · 0.85

Calls 7

MakeCSVParserFunction · 0.85
default_memory_poolFunction · 0.85
push_backMethod · 0.80
num_colsMethod · 0.80
DefaultsFunction · 0.50
num_rowsMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected