Read the column with the given index out of the BlockParser.
| 88 | |
| 89 | // Read the column with the given index out of the BlockParser. |
| 90 | void GetColumn(const BlockParser& parser, int32_t col_index, |
| 91 | std::vector<std::string>* out, std::vector<bool>* out_quoted = nullptr) { |
| 92 | std::vector<std::string> values; |
| 93 | std::vector<bool> quoted_values; |
| 94 | auto visit = [&](const uint8_t* data, uint32_t size, bool quoted) -> Status { |
| 95 | values.push_back(std::string(reinterpret_cast<const char*>(data), size)); |
| 96 | if (out_quoted) { |
| 97 | quoted_values.push_back(quoted); |
| 98 | } |
| 99 | return Status::OK(); |
| 100 | }; |
| 101 | ASSERT_OK(parser.VisitColumn(col_index, visit)); |
| 102 | *out = std::move(values); |
| 103 | if (out_quoted) { |
| 104 | *out_quoted = std::move(quoted_values); |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | void GetLastRow(const BlockParser& parser, std::vector<std::string>* out, |
| 109 | std::vector<bool>* out_quoted = nullptr) { |
no test coverage detected