fix SortingStep::updateOutputStream()

This commit is contained in:
Nikita Taranov 2022-04-25 16:54:30 +00:00
parent 2012b6717d
commit 5dc9478bac
2 changed files with 3 additions and 0 deletions

View File

@ -98,6 +98,8 @@ void SortingStep::updateInputStream(DataStream input_stream)
void SortingStep::updateOutputStream(Block result_header)
{
output_stream = createOutputStream(input_streams.at(0), std::move(result_header), getDataStreamTraits());
output_stream->sort_description = result_description;
output_stream->sort_mode = DataStream::SortMode::Stream;
updateDistinctColumns(output_stream->header, output_stream->distinct_columns);
}

View File

@ -1,4 +1,5 @@
<test>
<query>SELECT sipHash64(number) FROM numbers(1e8) ORDER BY number LIMIT 5</query>
<query>SELECT sipHash64(number) FROM numbers(1e8) ORDER BY number + 1 LIMIT 5</query>
<query>SELECT sipHash64(number) FROM numbers(1e8) ORDER BY number + 1 LIMIT 99999995, 5</query>
</test>