mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Fix #63653
This commit is contained in:
parent
6c0450f8ff
commit
7e5fc0d61d
@ -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