mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Merge pull request #30562 from ClickHouse/fix-header-after-limit-push-down
Fix LimitStep header after limit push down optimization.
This commit is contained in:
commit
8c2413f6fe
@ -40,7 +40,7 @@ void LimitStep::updateInputStream(DataStream input_stream)
|
||||
{
|
||||
input_streams.clear();
|
||||
input_streams.emplace_back(std::move(input_stream));
|
||||
output_stream = createOutputStream(input_streams.front(), output_stream->header, getDataStreamTraits());
|
||||
output_stream = createOutputStream(input_streams.front(), input_streams.front().header, getDataStreamTraits());
|
||||
}
|
||||
|
||||
void LimitStep::transformPipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &)
|
||||
|
21
tests/queries/0_stateless/02100_limit_push_down_bug.sql
Normal file
21
tests/queries/0_stateless/02100_limit_push_down_bug.sql
Normal file
@ -0,0 +1,21 @@
|
||||
drop table if exists tbl_repr;
|
||||
|
||||
CREATE TABLE tbl_repr(
|
||||
ts DateTime,
|
||||
x String)
|
||||
ENGINE=MergeTree ORDER BY ts;
|
||||
|
||||
|
||||
SELECT *
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
x,
|
||||
length(x)
|
||||
FROM tbl_repr
|
||||
WHERE ts > now()
|
||||
LIMIT 1
|
||||
)
|
||||
WHERE x != '';
|
||||
|
||||
drop table if exists tbl_repr;
|
Loading…
Reference in New Issue
Block a user