提交 f0c16900 编写于 作者: V Vadim Plakhtinskiy

CLICKHOUSE-3934 fix bug with CROSS JOIN

上级 2bab5f94
......@@ -2486,12 +2486,14 @@ bool ExpressionAnalyzer::appendJoin(ExpressionActionsChain & chain, bool only_ty
const auto & join_element = static_cast<const ASTTablesInSelectQueryElement &>(*select_query->join());
auto & join_params = static_cast<ASTTableJoin &>(*join_element.table_join);
if (join_params.strictness == ASTTableJoin::Strictness::Unspecified)
if (join_params.strictness == ASTTableJoin::Strictness::Unspecified && join_params.kind != ASTTableJoin::Kind::Cross)
{
if (settings.join_default_strictness.toString() == "ANY")
join_params.strictness = ASTTableJoin::Strictness::Any;
else if (settings.join_default_strictness.toString() == "ALL")
join_params.strictness = ASTTableJoin::Strictness::All;
else if (settings.join_default_strictness.toString() != "")
throw Exception("Unexcepted join_default_strictness value = " + settings.join_default_strictness.toString() + ". It can be an empty string, ANY or ALL");
else
throw Exception("Expected ANY or ALL in JOIN section, because setting (join_default_strictness) is empty", DB::ErrorCodes::EXPECT_ALL_OR_ANY);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册