| 187 | return SelectKOptions{k, keys}; |
| 188 | } |
| 189 | static SelectKOptions BottomKDefault(int64_t k, |
| 190 | std::vector<std::string> key_names = {}) { |
| 191 | std::vector<SortKey> keys; |
| 192 | for (const auto& name : key_names) { |
| 193 | keys.emplace_back(SortKey(name, SortOrder::Ascending)); |
| 194 | } |
| 195 | if (key_names.empty()) { |
| 196 | keys.emplace_back(SortKey("not-used", SortOrder::Ascending)); |
| 197 | } |
| 198 | return SelectKOptions{k, keys}; |
| 199 | } |
| 200 | |
| 201 | /// Get sort_keys |
| 202 | /// will be removed after null_placement has been removed from other |