mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Fixed code review issues
This commit is contained in:
parent
948f3f1f62
commit
1c5b377b3a
@ -132,9 +132,15 @@ struct GroupArraySortedData
|
||||
ALWAYS_INLINE void sortAndLimit(size_t max_elements, Arena * arena)
|
||||
{
|
||||
if constexpr (is_value_generic_field)
|
||||
{
|
||||
::sort(values.begin(), values.end(), Comparator());
|
||||
}
|
||||
else
|
||||
{
|
||||
bool is_sorted = trySort(values.begin(), values.end(), Comparator());
|
||||
if (!is_sorted)
|
||||
RadixSort<RadixSortNumTraits<T>>::executeLSD(values.data(), values.size());
|
||||
}
|
||||
|
||||
if (values.size() > max_elements)
|
||||
values.resize(max_elements, arena);
|
||||
|
@ -182,8 +182,8 @@ int main(int argc, char ** argv)
|
||||
}
|
||||
|
||||
std::string method = std::string(argv[1]);
|
||||
uint64_t elements = std::atol(argv[2]);
|
||||
uint64_t max_elements = std::atol(argv[3]);
|
||||
uint64_t elements = std::atol(argv[2]); /// NOLINT
|
||||
uint64_t max_elements = std::atol(argv[3]); /// NOLINT
|
||||
|
||||
std::cerr << "Method " << method << " elements " << elements << " max elements " << max_elements << '\n';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user