| 242 | } |
| 243 | |
| 244 | void 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 | } |
nothing calls this directly
no test coverage detected