Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Interpreters/QueryNormalizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ void QueryNormalizer::visit(ASTPtr & ast, Data & data)
visit(*node_select, ast, data);
else if (auto * node_param = ast->as<ASTQueryParameter>())
throw Exception("Query parameter " + backQuote(node_param->name) + " was not set", ErrorCodes::UNKNOWN_QUERY_PARAMETER);
else if (auto * node_function = ast->as<ASTFunction>())
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())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1 [1]
[1]
99.9
0.1 99.9
[99.9]
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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)
);

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
WITH x AS y SELECT 1;

DROP TEMPORARY TABLE IF EXISTS t1;
DROP TEMPORARY TABLE IF EXISTS t2;

CREATE TEMPORARY TABLE t1 (a Int64);
CREATE TEMPORARY TABLE t2 (a Int64, b Int64);

WITH b AS bb SELECT bb FROM t2 WHERE a IN (SELECT a FROM t1);