mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 16:50:48 +00:00
Update DistinctSortedBlockInputStream.h
This commit is contained in:
parent
e62769190e
commit
f03f32e2ab
@ -10,6 +10,9 @@ namespace DB
|
|||||||
/** This class is intended for implementation of SELECT DISTINCT clause and
|
/** This class is intended for implementation of SELECT DISTINCT clause and
|
||||||
* leaves only unique rows in the stream.
|
* 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
|
* To optimize the SELECT DISTINCT ... LIMIT clause we can
|
||||||
* set limit_hint to non zero value. So we stop emitting new rows after
|
* set limit_hint to non zero value. So we stop emitting new rows after
|
||||||
* count of already emitted rows will reach the limit_hint.
|
* count of already emitted rows will reach the limit_hint.
|
||||||
@ -46,12 +49,14 @@ private:
|
|||||||
size_t rows,
|
size_t rows,
|
||||||
ClearableSetVariants & variants) const;
|
ClearableSetVariants & variants) const;
|
||||||
|
|
||||||
const SortDescription& description;
|
const SortDescription & description;
|
||||||
|
|
||||||
struct PreviousBlock
|
struct PreviousBlock
|
||||||
{
|
{
|
||||||
Block block;
|
Block block;
|
||||||
ConstColumnPlainPtrs clearing_hint_columns;
|
ConstColumnPlainPtrs clearing_hint_columns;
|
||||||
} prev_block;
|
};
|
||||||
|
PreviousBlock prev_block;
|
||||||
|
|
||||||
Names columns_names;
|
Names columns_names;
|
||||||
ClearableSetVariants data;
|
ClearableSetVariants data;
|
||||||
|
Loading…
Reference in New Issue
Block a user