mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 11:52:27 +00:00
Fix Distinct properties
This commit is contained in:
parent
6f2851ef70
commit
79d4d029b8
@ -26,13 +26,14 @@ static bool checkColumnsAlreadyDistinct(const Names & columns, const NameSet & d
|
|||||||
|
|
||||||
static ITransformingStep::Traits getTraits(bool pre_distinct, bool already_distinct_columns)
|
static ITransformingStep::Traits getTraits(bool pre_distinct, bool already_distinct_columns)
|
||||||
{
|
{
|
||||||
|
const bool preserves_number_of_streams = pre_distinct || already_distinct_columns;
|
||||||
return ITransformingStep::Traits
|
return ITransformingStep::Traits
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
.preserves_distinct_columns = already_distinct_columns, /// Will be calculated separately otherwise
|
.preserves_distinct_columns = already_distinct_columns, /// Will be calculated separately otherwise
|
||||||
.returns_single_stream = !pre_distinct && !already_distinct_columns,
|
.returns_single_stream = !pre_distinct && !already_distinct_columns,
|
||||||
.preserves_number_of_streams = pre_distinct || already_distinct_columns,
|
.preserves_number_of_streams = preserves_number_of_streams,
|
||||||
.preserves_sorting = true, /// Sorting is preserved indeed because of implementation.
|
.preserves_sorting = preserves_number_of_streams,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.preserves_number_of_rows = false,
|
.preserves_number_of_rows = false,
|
||||||
|
Loading…
Reference in New Issue
Block a user