| 100 | using PartialSortingLessWithCollation = PartialSortingLessImpl<true>; |
| 101 | |
| 102 | ColumnsWithSortDescriptions getColumnsWithSortDescription(const Block & block, const SortDescription & description) |
| 103 | { |
| 104 | size_t size = description.size(); |
| 105 | |
| 106 | ColumnsWithSortDescriptions result; |
| 107 | result.reserve(size); |
| 108 | |
| 109 | for (size_t i = 0; i < size; ++i) |
| 110 | { |
| 111 | const auto & sort_column_description = description[i]; |
| 112 | |
| 113 | auto column = block.getColumnOrSubcolumnByName(sort_column_description.column_name); |
| 114 | |
| 115 | if (isCollationRequired(sort_column_description)) |
| 116 | { |
| 117 | if (!column.column->isCollationSupported()) |
| 118 | throw Exception(ErrorCodes::BAD_COLLATION, "Collations could be specified only for String, LowCardinality(String), " |
| 119 | "Nullable(String) or for Array or Tuple, containing them."); |
| 120 | } |
| 121 | |
| 122 | result.emplace_back(ColumnWithSortDescription{column.column, sort_column_description, isColumnConst(*column.column)}); |
| 123 | } |
| 124 | |
| 125 | return result; |
| 126 | } |
| 127 | |
| 128 | void getBlockSortPermutationImpl(const Block & block, const SortDescription & description, IColumn::PermutationSortStability stability, UInt64 limit, IColumn::Permutation & permutation) |
| 129 | { |
no test coverage detected