mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 02:52:13 +00:00
Merge pull request #3147 from VadimPE/CLICKHOUSE-3993
CLICKHOUSE-3993 add default type of JOIN in query
This commit is contained in:
commit
c62b640595
@ -151,8 +151,8 @@ bool ParserTablesInSelectQueryElement::parseImpl(Pos & pos, ASTPtr & node, Expec
|
|||||||
table_join->kind = ASTTableJoin::Kind::Cross;
|
table_join->kind = ASTTableJoin::Kind::Cross;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/// Maybe need use INNER by default as in another DBMS.
|
/// Use INNER by default as in another DBMS.
|
||||||
return false;
|
table_join->kind = ASTTableJoin::Kind::Inner;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (table_join->strictness != ASTTableJoin::Strictness::Unspecified
|
if (table_join->strictness != ASTTableJoin::Strictness::Unspecified
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
3 3
|
10
dbms/tests/queries/0_stateless/00717_default_join_type.sql
Normal file
10
dbms/tests/queries/0_stateless/00717_default_join_type.sql
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
DROP TABLE IF EXISTS test.default_join1;
|
||||||
|
DROP TABLE IF EXISTS test.default_join2;
|
||||||
|
|
||||||
|
CREATE TABLE test.default_join1(a Int64, b Int64) ENGINE=Memory;
|
||||||
|
CREATE TABLE test.default_join2(a Int64, b Int64) ENGINE=Memory;
|
||||||
|
|
||||||
|
INSERT INTO test.default_join1 VALUES(1, 1), (2, 2), (3, 3);
|
||||||
|
INSERT INTO test.default_join2 VALUES(3, 3), (4, 4);
|
||||||
|
|
||||||
|
SELECT a, b FROM test.default_join1 JOIN (SELECT a, b FROM test.default_join2) USING a ORDER BY b SETTINGS join_default_strictness='ANY';
|
Loading…
Reference in New Issue
Block a user