Skip to content

Commit

Permalink
hotfix for allow_experimental_multiple_joins_emulation
Browse files Browse the repository at this point in the history
  • Loading branch information
4ertus2 committed Feb 1, 2019
1 parent 2b8c30a commit 52de2cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dbms/src/Interpreters/JoinToSubqueryTransformVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ struct RewriteTablesVisitorData

static bool needRewrite(ASTSelectQuery & select)
{
if (!select.tables)
return false;

auto tables = typeid_cast<const ASTTablesInSelectQuery *>(select.tables.get());
if (!tables)
return false;
Expand Down
2 changes: 2 additions & 0 deletions dbms/tests/queries/0_stateless/00820_multiple_joins.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ INSERT INTO table5 SELECT number * 5, number * 50, number * 500 FROM numbers(10)

SET allow_experimental_multiple_joins_emulation = 1;

SELECT 1 LIMIT 0;

-- FIXME: wrong names qualification
select a, b, c from table1 as t1 join table2 as t2 on t1.a = t2.a join table3 as t3 on b = t3.b;
select a, b, c from table1 as t1 join table2 as t2 on t1.a = t2.a join table5 as t5 on a = t5.a AND b = t5.b;
Expand Down

0 comments on commit 52de2cd

Please sign in to comment.