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

Function GetLastRow

cpp/src/arrow/csv/parser_test.cc:110–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110void GetLastRow(const BlockParser& parser, std::vector<std::string>* out,
111 std::vector<bool>* out_quoted = nullptr) {
112 std::vector<std::string> values;
113 std::vector<bool> quoted_values;
114 auto visit = [&](const uint8_t* data, uint32_t size, bool quoted,
115 bool missing) -> Status {
116 EXPECT_FALSE(missing);
117 values.push_back(std::string(reinterpret_cast<const char*>(data), size));
118 if (out_quoted) {
119 quoted_values.push_back(quoted);
120 }
121 return Status::OK();
122 };
123 ASSERT_OK(parser.VisitLastRow(visit));
124 *out = std::move(values);
125 if (out_quoted) {
126 *out_quoted = std::move(quoted_values);
127 }
128}
129
130size_t TotalViewLength(const std::vector<std::string_view>& views) {
131 size_t total_view_length = 0;

Callers 2

AssertLastRowEqFunction · 0.85
TESTFunction · 0.85

Calls 2

push_backMethod · 0.80
OKFunction · 0.50

Tested by

no test coverage detected