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

Function stableSortBlock

src/Interpreters/sortBlock.cpp:244–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244void stableSortBlock(Block & block, const SortDescription & description)
245{
246 if (!block)
247 return;
248
249 IColumn::Permutation permutation;
250 getBlockSortPermutationImpl(block, description, IColumn::PermutationSortStability::Stable, 0, permutation);
251
252 if (permutation.empty())
253 return;
254
255 size_t columns = block.columns();
256 for (size_t i = 0; i < columns; ++i)
257 {
258 auto & column_to_sort = block.getByPosition(i).column;
259 column_to_sort = column_to_sort->permute(permutation, 0);
260 }
261}
262
263}

Callers

nothing calls this directly

Calls 4

columnsMethod · 0.80
emptyMethod · 0.45
permuteMethod · 0.45

Tested by

no test coverage detected