mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
Handle empty expression list in cross join
This commit is contained in:
parent
69160fa3e3
commit
eb7ac4c3a6
@ -377,7 +377,11 @@ private:
|
||||
static void visit(ASTSelectQuery & select, ASTPtr &, Data & data)
|
||||
{
|
||||
if (!data.done)
|
||||
{
|
||||
if (data.expression_list->children.empty())
|
||||
data.expression_list->children.emplace_back(std::make_shared<ASTAsterisk>());
|
||||
select.setExpression(ASTSelectQuery::Expression::SELECT, std::move(data.expression_list));
|
||||
}
|
||||
data.done = true;
|
||||
}
|
||||
};
|
||||
|
@ -0,0 +1,52 @@
|
||||
24
|
||||
24
|
||||
24
|
||||
24 24 24
|
||||
0 0 0
|
||||
0 0 1
|
||||
0 0 2
|
||||
0 0 3
|
||||
0 1 0
|
||||
0 1 1
|
||||
0 1 2
|
||||
0 1 3
|
||||
0 2 0
|
||||
0 2 1
|
||||
0 2 2
|
||||
0 2 3
|
||||
1 0 0
|
||||
1 0 1
|
||||
1 0 2
|
||||
1 0 3
|
||||
1 1 0
|
||||
1 1 1
|
||||
1 1 2
|
||||
1 1 3
|
||||
1 2 0
|
||||
1 2 1
|
||||
1 2 2
|
||||
1 2 3
|
||||
0 0 0
|
||||
0 0 1
|
||||
0 0 2
|
||||
0 0 3
|
||||
0 1 0
|
||||
0 1 1
|
||||
0 1 2
|
||||
0 1 3
|
||||
0 2 0
|
||||
0 2 1
|
||||
0 2 2
|
||||
0 2 3
|
||||
1 0 0
|
||||
1 0 1
|
||||
1 0 2
|
||||
1 0 3
|
||||
1 1 0
|
||||
1 1 1
|
||||
1 1 2
|
||||
1 1 3
|
||||
1 2 0
|
||||
1 2 1
|
||||
1 2 2
|
||||
1 2 3
|
@ -0,0 +1,6 @@
|
||||
SELECT count(1) FROM numbers(2) AS n1, numbers(3) AS n2, numbers(4) AS n3;
|
||||
SELECT count(*) FROM numbers(2) AS n1, numbers(3) AS n2, numbers(4) AS n3;
|
||||
SELECT count() FROM numbers(2) AS n1, numbers(3) AS n2, numbers(4) AS n3;
|
||||
SELECT count(n1.number), count(n2.number), count(n3.number) FROM numbers(2) AS n1, numbers(3) AS n2, numbers(4) AS n3;
|
||||
SELECT * FROM numbers(2) AS n1, numbers(3) AS n2, numbers(4) AS n3 ORDER BY n1.number, n2.number, n3.number;
|
||||
SELECT n1.number, n2.number, n3.number FROM numbers(2) AS n1, numbers(3) AS n2, numbers(4) AS n3 ORDER BY n1.number, n2.number, n3.number;
|
Loading…
Reference in New Issue
Block a user