[Improvement](sort) improve partial sort algorithm (#12349)

* [Improvement](sort) improve partial sort algorithm
This commit is contained in:
Gabriel
2022-09-09 15:44:18 +08:00
committed by GitHub
parent 6b8a139f2d
commit 66491ec137
15 changed files with 497 additions and 9 deletions

View File

@ -35,6 +35,7 @@
#include "vec/common/nan_utils.h"
#include "vec/common/sip_hash.h"
#include "vec/common/unaligned.h"
#include "vec/core/sort_block.h"
namespace doris::vectorized {
@ -111,6 +112,13 @@ void ColumnVector<T>::update_hashes_with_value(std::vector<SipHash>& hashes,
SIP_HASHES_FUNCTION_COLUMN_IMPL();
}
template <typename T>
void ColumnVector<T>::sort_column(const ColumnSorter* sorter, EqualFlags& flags,
IColumn::Permutation& perms, EqualRange& range,
bool last_column) const {
sorter->template sort_column(static_cast<const Self&>(*this), flags, perms, range, last_column);
}
template <typename T>
struct ColumnVector<T>::less {
const Self& parent;