MCPcopy Create free account
hub / github.com/ByConity/ByConity / extractSortColumns

Function extractSortColumns

src/DataStreams/LimitBlockInputStream.cpp:10–25  ·  view source on GitHub ↗

gets pointers to all columns of block, which were used for ORDER BY

Source from the content-addressed store, hash-verified

8
9/// gets pointers to all columns of block, which were used for ORDER BY
10static 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
28LimitBlockInputStream::LimitBlockInputStream(

Callers 3

readImplMethod · 0.85
splitChunkMethod · 0.85

Calls 6

getByNameMethod · 0.80
sizeMethod · 0.45
reserveMethod · 0.45
emptyMethod · 0.45
getMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected