mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Fix LimitStep header after limit push down optimization.
This commit is contained in:
parent
1e2ceeb2e7
commit
54cc8e1d27
@ -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