mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Review fixes.
This commit is contained in:
parent
af7dca7bb7
commit
d683bf42ce
@ -946,7 +946,7 @@ std::pair<ActionsDAGPtr, ActionsDAGPtr> ActionsDAG::split(std::unordered_set<con
|
||||
{
|
||||
auto & child_data = data[child];
|
||||
|
||||
/// If children is not created, int may be from split part.
|
||||
/// If children is not created, it may be from split part.
|
||||
if (!child_data.to_second)
|
||||
{
|
||||
if (child->type == ActionType::COLUMN) /// Just create new node for COLUMN action.
|
||||
|
@ -600,6 +600,12 @@ static bool trySplitFilter(QueryPlan::Node * node, QueryPlan::Nodes & nodes)
|
||||
|
||||
void QueryPlan::optimize()
|
||||
{
|
||||
/* Stack contains info for every nodes in the path from tree root to the current node.
|
||||
* Every optimization changes only current node and it's children.
|
||||
* Optimization may change QueryPlanStep, but not QueryPlan::Node (only add a new one).
|
||||
* So, QueryPlan::Node::children will be always valid.
|
||||
*/
|
||||
|
||||
struct Frame
|
||||
{
|
||||
Node * node;
|
||||
|
@ -1,4 +1,4 @@
|
||||
<test>
|
||||
<query>select sum(x), sum(y) from (select sipHash64(number) as x, bitAnd(number, 1024) as y from numbers_mt(200000000)) where y = 0 settings enable_optimize_predicate_expression=0</query>
|
||||
<query>select sum(x), sum(y) from (select sipHash64(number) as x, bitAnd(number, 1024) as y from numbers_mt(200000000) limit 200000000) where y = 0</query>
|
||||
<query>select sum(x), sum(y) from (select sipHash64(number) as x, bitAnd(number, 1023) as y from numbers_mt(200000000)) where y = 0 settings enable_optimize_predicate_expression=0</query>
|
||||
<query>select sum(x), sum(y) from (select sipHash64(number) as x, bitAnd(number, 1023) as y from numbers_mt(200000000) limit 200000000) where y = 0</query>
|
||||
</test>
|
||||
|
@ -309,7 +309,8 @@
|
||||
"01632_max_partitions_to_read",
|
||||
"01638_div_mod_ambiguities",
|
||||
"01642_if_nullable_regression",
|
||||
"01643_system_suspend"
|
||||
"01643_system_suspend",
|
||||
"01655_plan_optimizations"
|
||||
],
|
||||
"parallel":
|
||||
[
|
||||
|
Loading…
Reference in New Issue
Block a user