Update DistinctSortedBlockInputStream.h

This commit is contained in:
alexey-milovidov 2017-04-14 23:59:37 +04:00
parent e62769190e
commit f03f32e2ab

View File

@ -10,6 +10,9 @@ namespace DB
/** This class is intended for implementation of SELECT DISTINCT clause and
* leaves only unique rows in the stream.
*
* Implementation for case, when input stream has rows for same DISTINCT key or at least its prefix,
* grouped together (going consecutively).
*
* To optimize the SELECT DISTINCT ... LIMIT clause we can
* set limit_hint to non zero value. So we stop emitting new rows after
* count of already emitted rows will reach the limit_hint.
@ -47,11 +50,13 @@ private:
ClearableSetVariants & variants) const;
const SortDescription & description;
struct PreviousBlock
{
Block block;
ConstColumnPlainPtrs clearing_hint_columns;
} prev_block;
};
PreviousBlock prev_block;
Names columns_names;
ClearableSetVariants data;