| 18 | } |
| 19 | |
| 20 | static inline std::vector<String> getVectorString(const ColumnPtr & col_base, UInt64 row) |
| 21 | { |
| 22 | auto col = static_cast<const ColumnArray *>(col_base.get()); |
| 23 | auto data_col = static_cast<const ColumnString *>(col->getDataPtr().get()); |
| 24 | auto offsets_col = static_cast<const ColumnArray::ColumnOffsets *>(col->getOffsetsPtr().get()); |
| 25 | |
| 26 | auto offset = offsets_col->getElement(row); |
| 27 | auto prev_offset = row == 0 ? 0 : offsets_col->getElement(row - 1); |
| 28 | auto size = offset - prev_offset; |
| 29 | |
| 30 | std::vector<String> result; |
| 31 | result.reserve(size); |
| 32 | for (auto i = prev_offset; i < offset; ++i) |
| 33 | result.emplace_back(data_col->getDataAt(i)); |
| 34 | |
| 35 | return result; |
| 36 | } |
| 37 | |
| 38 | static inline Float64 getFloat64(const ColumnPtr & col_base, UInt64 row) |
| 39 | { |
no test coverage detected