| 172 | return SelectKOptions{k, keys}; |
| 173 | } |
| 174 | static SelectKOptions BottomKDefault(int64_t k, |
| 175 | std::vector<std::string> key_names = {}) { |
| 176 | std::vector<SortKey> keys; |
| 177 | for (const auto& name : key_names) { |
| 178 | keys.emplace_back(SortKey(name, SortOrder::Ascending)); |
| 179 | } |
| 180 | if (key_names.empty()) { |
| 181 | keys.emplace_back(SortKey("not-used", SortOrder::Ascending)); |
| 182 | } |
| 183 | return SelectKOptions{k, keys}; |
| 184 | } |
| 185 | |
| 186 | /// Get sort_keys |
| 187 | /// will be removed after null_placement has been removed from other |