mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 03:25:15 +00:00
Updated to not clear on_expression from table_join as its used by future analyze runs
This commit is contained in:
parent
b99706b736
commit
6763a9d1ff
@ -655,10 +655,7 @@ void collectJoinedColumns(TableJoin & analyzed_join, ASTTableJoin & table_join,
|
||||
{
|
||||
bool join_on_const_ok = tryJoinOnConst(analyzed_join, table_join.on_expression, context);
|
||||
if (join_on_const_ok)
|
||||
{
|
||||
table_join.on_expression = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
bool is_asof = (table_join.strictness == JoinStrictness::Asof);
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
1 2
|
||||
1 1
|
||||
0 0
|
@ -0,0 +1,9 @@
|
||||
CREATE TABLE t0 (c0 Int32) ENGINE = Memory;
|
||||
CREATE TABLE t1 (c1 Int32) ENGINE = Memory;
|
||||
|
||||
INSERT INTO t0(c0) VALUES (1), (2);
|
||||
INSERT INTO t1(c1) VALUES (1);
|
||||
|
||||
SELECT max(1), count() FROM t0 AS t0 LEFT JOIN t1 ON true WHERE 1;
|
||||
SELECT max(1), count() FROM t0 AS t0 INNER JOIN t1 ON t0.c0 = t1.c1 WHERE 1;
|
||||
SELECT max(1), count() FROM t0 AS t0 INNER JOIN t1 ON true WHERE 0;
|
Loading…
Reference in New Issue
Block a user