mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Properly check distinct columns.
This commit is contained in:
parent
4c09880bc4
commit
4378ca21ca
@ -11,7 +11,7 @@ static ITransformingStep::Traits getTraits()
|
||||
return ITransformingStep::Traits
|
||||
{
|
||||
{
|
||||
.preserves_distinct_columns = true,
|
||||
.preserves_distinct_columns = false, /// TODO: check if true later.
|
||||
.returns_single_stream = false,
|
||||
.preserves_number_of_streams = true,
|
||||
.preserves_sorting = true,
|
||||
|
@ -109,7 +109,6 @@ JoinStep::JoinStep(const DataStream & input_stream_, JoinPtr join_)
|
||||
getJoinTraits())
|
||||
, join(std::move(join_))
|
||||
{
|
||||
updateDistinctColumns(output_stream->header, output_stream->distinct_columns);
|
||||
}
|
||||
|
||||
void JoinStep::transformPipeline(QueryPipeline & pipeline)
|
||||
|
@ -55,9 +55,9 @@ void ITransformingStep::updateDistinctColumns(const Block & res_header, NameSet
|
||||
if (distinct_columns.empty())
|
||||
return;
|
||||
|
||||
for (const auto & column : res_header)
|
||||
for (const auto & column : distinct_columns)
|
||||
{
|
||||
if (distinct_columns.count(column.name) == 0)
|
||||
if (!res_header.has(column))
|
||||
{
|
||||
distinct_columns.clear();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user