#pragma once #include namespace DB { template struct ValueWithIndex { T value; UInt32 index; }; template struct RadixSortTraits : RadixSortNumTraits { using Element = ValueWithIndex; using Result = size_t; static T & extractKey(Element & elem) { return elem.value; } static size_t extractResult(Element & elem) { return elem.index; } }; }