mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-01 03:52:15 +00:00
aa5fc05a55
This reverts commitf6dee5fe3c
, reversing changes made tof96bda1deb
.
26 lines
422 B
C++
26 lines
422 B
C++
#pragma once
|
|
|
|
#include <Common/RadixSort.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
template <typename T>
|
|
struct ValueWithIndex
|
|
{
|
|
T value;
|
|
UInt32 index;
|
|
};
|
|
|
|
template <typename T>
|
|
struct RadixSortTraits : RadixSortNumTraits<T>
|
|
{
|
|
using Element = ValueWithIndex<T>;
|
|
using Result = size_t;
|
|
|
|
static T & extractKey(Element & elem) { return elem.value; }
|
|
static size_t extractResult(Element & elem) { return elem.index; }
|
|
};
|
|
|
|
}
|