mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
commit
6315c32407
@ -219,7 +219,7 @@ void addRequestedPathFileAndSizeVirtualsToChunk(
|
||||
}
|
||||
}
|
||||
|
||||
static bool canEvaluateSubtree(const ActionsDAG::Node * node, const Block & allowed_inputs)
|
||||
static bool canEvaluateSubtree(const ActionsDAG::Node * node, const Block * allowed_inputs)
|
||||
{
|
||||
std::stack<const ActionsDAG::Node *> nodes;
|
||||
nodes.push(node);
|
||||
@ -228,7 +228,10 @@ static bool canEvaluateSubtree(const ActionsDAG::Node * node, const Block & allo
|
||||
const auto * cur = nodes.top();
|
||||
nodes.pop();
|
||||
|
||||
if (cur->type == ActionsDAG::ActionType::INPUT && !allowed_inputs.has(cur->result_name))
|
||||
if (cur->type == ActionsDAG::ActionType::ARRAY_JOIN)
|
||||
return false;
|
||||
|
||||
if (cur->type == ActionsDAG::ActionType::INPUT && allowed_inputs && !allowed_inputs->has(cur->result_name))
|
||||
return false;
|
||||
|
||||
for (const auto * child : cur->children)
|
||||
@ -336,7 +339,7 @@ static const ActionsDAG::Node * splitFilterNodeForAllowedInputs(
|
||||
}
|
||||
}
|
||||
|
||||
if (allowed_inputs && !canEvaluateSubtree(node, *allowed_inputs))
|
||||
if (!canEvaluateSubtree(node, allowed_inputs))
|
||||
return nullptr;
|
||||
|
||||
return node;
|
||||
|
@ -0,0 +1 @@
|
||||
0
|
@ -5,3 +5,9 @@ INSERT INTO prewhere SELECT 0, randomPrintableASCII(10000) FROM numbers(10000);
|
||||
SELECT arrayJoin([light]) != 0 AS cond, length(heavy) FROM prewhere WHERE light != 0 AND cond != 0;
|
||||
|
||||
DROP TABLE prewhere;
|
||||
|
||||
DROP TABLE IF EXISTS testtable;
|
||||
CREATE TABLE testtable (DT Datetime, Label1 String, Value UInt64) ENGINE = MergeTree() PARTITION BY DT ORDER BY Label1;
|
||||
INSERT INTO testtable (*) Values (now(), 'app', 1);
|
||||
SELECT arrayJoin([0, 1]) AS arrayIdx FROM testtable WHERE arrayIdx = 0;
|
||||
DROP TABLE testtable;
|
||||
|
Loading…
Reference in New Issue
Block a user