gets pointers to all columns of block, which were used for ORDER BY
| 8 | |
| 9 | /// gets pointers to all columns of block, which were used for ORDER BY |
| 10 | static ColumnRawPtrs extractSortColumns(const Block & block, const SortDescription & description) |
| 11 | { |
| 12 | size_t size = description.size(); |
| 13 | ColumnRawPtrs res; |
| 14 | res.reserve(size); |
| 15 | |
| 16 | for (size_t i = 0; i < size; ++i) |
| 17 | { |
| 18 | const IColumn * column = !description[i].column_name.empty() |
| 19 | ? block.getByName(description[i].column_name).column.get() |
| 20 | : block.safeGetByPosition(description[i].column_number).column.get(); |
| 21 | res.emplace_back(column); |
| 22 | } |
| 23 | |
| 24 | return res; |
| 25 | } |
| 26 | |
| 27 | |
| 28 | LimitBlockInputStream::LimitBlockInputStream( |