diff --git a/src/Interpreters/QueryNormalizer.cpp b/src/Interpreters/QueryNormalizer.cpp index 7c820622c379..ea61ade2b49d 100644 --- a/src/Interpreters/QueryNormalizer.cpp +++ b/src/Interpreters/QueryNormalizer.cpp @@ -256,9 +256,6 @@ void QueryNormalizer::visit(ASTPtr & ast, Data & data) visit(*node_select, ast, data); else if (auto * node_param = ast->as()) throw Exception("Query parameter " + backQuote(node_param->name) + " was not set", ErrorCodes::UNKNOWN_QUERY_PARAMETER); - else if (auto * node_function = ast->as()) - if (node_function->parameters) - visit(node_function->parameters, data); /// If we replace the root of the subtree, we will be called again for the new root, in case the alias is replaced by an alias. if (ast.get() != initial_ast.get()) diff --git a/src/Interpreters/RequiredSourceColumnsVisitor.cpp b/src/Interpreters/RequiredSourceColumnsVisitor.cpp index 21ec94a6917d..2f2a68656bc4 100644 --- a/src/Interpreters/RequiredSourceColumnsVisitor.cpp +++ b/src/Interpreters/RequiredSourceColumnsVisitor.cpp @@ -123,17 +123,6 @@ void RequiredSourceColumnsMatcher::visit(const ASTSelectQuery & select, const AS data.addColumnAliasIfAny(*node); } - if (const auto & with = select.with()) - { - for (auto & node : with->children) - { - if (const auto * identifier = node->as()) - data.addColumnIdentifier(*identifier); - else - data.addColumnAliasIfAny(*node); - } - } - std::vector out; for (const auto & node : select.children) { diff --git a/tests/queries/0_stateless/02006_use_constants_in_with_and_select.reference b/tests/queries/0_stateless/02006_use_constants_in_with_and_select.reference deleted file mode 100644 index bbf008ffdf20..000000000000 --- a/tests/queries/0_stateless/02006_use_constants_in_with_and_select.reference +++ /dev/null @@ -1,5 +0,0 @@ -1 [1] -[1] -99.9 -0.1 99.9 -[99.9] diff --git a/tests/queries/0_stateless/02006_use_constants_in_with_and_select.sql b/tests/queries/0_stateless/02006_use_constants_in_with_and_select.sql deleted file mode 100644 index daca6c5d0c79..000000000000 --- a/tests/queries/0_stateless/02006_use_constants_in_with_and_select.sql +++ /dev/null @@ -1,36 +0,0 @@ -SELECT - 1 AS max_size, - groupArray(max_size)(col) -FROM - (SELECT col FROM ( - SELECT 1 AS col - UNION ALL - SELECT 2 - ) ORDER BY col); - -WITH 1 AS max_size -SELECT groupArray(max_size)(col) -FROM - (SELECT col FROM ( - SELECT 1 as col - UNION ALL - SELECT 2 - ) ORDER BY col); - -WITH 0.1 AS level -SELECT quantile(level)(number) -FROM numbers(1000); - -SELECT 0.1 AS level, quantile(level)(number) -FROM numbers(1000); - -WITH - 0.1 AS level, - 1 AS max_size -SELECT groupArray(max_size)(col) -FROM - ( - SELECT quantile(level)(number) AS col - FROM numbers(1000) - ); -