mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Merge pull request #63702 from ClickHouse/add-fuzzed-analyzer_join_with_constants
Fix fuzzed analyzer_join_with_constant query
This commit is contained in:
commit
5f91cb6dd7
@ -36,6 +36,12 @@ public:
|
||||
|
||||
void visitImpl(const QueryTreeNodePtr & node)
|
||||
{
|
||||
if (const auto * constant_node = node->as<ConstantNode>())
|
||||
/// Collect sets from source expression as well.
|
||||
/// Most likely we will not build them, but those sets could be requested during analysis.
|
||||
if (constant_node->hasSourceExpression())
|
||||
collectSets(constant_node->getSourceExpression(), planner_context);
|
||||
|
||||
auto * function_node = node->as<FunctionNode>();
|
||||
if (!function_node || !isNameOfInFunction(function_node->getFunctionName()))
|
||||
return;
|
||||
|
@ -8,3 +8,5 @@
|
||||
--
|
||||
1 1 0 0
|
||||
--
|
||||
--
|
||||
1 1 0 0
|
||||
|
@ -25,3 +25,8 @@ SELECT * FROM (SELECT 1 AS id, 1 AS value) AS t1 ASOF LEFT JOIN (SELECT 1 AS id,
|
||||
SELECT '--';
|
||||
|
||||
SELECT b.dt FROM (SELECT NULL > NULL AS pk, 1 AS dt FROM numbers(5)) AS a ASOF LEFT JOIN (SELECT NULL AS pk, 1 AS dt) AS b ON (a.pk = b.pk) AND 1 != 1 AND (a.dt >= b.dt); -- { serverError 403, NOT_FOUND_COLUMN_IN_BLOCK }
|
||||
|
||||
SELECT '--';
|
||||
|
||||
-- Fuzzed
|
||||
SELECT * FROM (SELECT 1 AS id, 1 AS value) AS t1 ASOF LEFT JOIN (SELECT 1 AS id, 1 AS value) AS t2 ON (t1.id = t2.id) AND (toUInt256(1) IN (SELECT materialize(1))) AND (1 != 1) AND (t1.value >= t2.value);
|
||||
|
Loading…
Reference in New Issue
Block a user