mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Apply suggestions from code review
Co-authored-by: Nikita Taranov <nikita.taranov@clickhouse.com>
This commit is contained in:
parent
e4c0afcc3e
commit
1a89ecd386
@ -1547,6 +1547,8 @@ void InterpreterSelectQuery::executeImpl(QueryPlan & query_plan, std::optional<P
|
||||
};
|
||||
/// This optimization relies on the sorting that should buffer the whole stream before emitting any rows.
|
||||
/// It doesn't hold such a guarantee for streams with const keys.
|
||||
/// Note: it's also doesn't work with the read-in-order optimization.
|
||||
/// No checks here because read in order is not applied if we have `CreateSetAndFilterOnTheFlyStep` in the pipeline between the reading and sorting steps.
|
||||
bool has_non_const_keys = has_non_const(query_plan.getCurrentDataStream().header, join_clause.key_names_left)
|
||||
&& has_non_const(joined_plan->getCurrentDataStream().header, join_clause.key_names_right);
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include <Processors/PingPongProcessor.h>
|
||||
|
||||
#include <Common/logger_useful.h>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
@ -12,4 +12,3 @@ a a
|
||||
a a
|
||||
1
|
||||
1
|
||||
a a
|
||||
|
@ -41,9 +41,3 @@ SELECT count() == 0 FROM (EXPLAIN PIPELINE
|
||||
;
|
||||
|
||||
|
||||
-- WITH CUBE is not supported in allow_experimental_analyzer, so the result number of rows is different
|
||||
SELECT * FROM ( SELECT 'a' AS key ) AS t1
|
||||
INNER JOIN ( SELECT 'a' AS key GROUP BY ignore(1), ignore(2) WITH CUBE ) AS t2
|
||||
ON t1.key = t2.key
|
||||
SETTINGS allow_experimental_analyzer = 1
|
||||
;
|
||||
|
Loading…
Reference in New Issue
Block a user