mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Check can become nullable before applying join_use_nulls
This commit is contained in:
parent
40d658e467
commit
12141bb6cd
@ -1219,6 +1219,7 @@ private:
|
|||||||
static void convertJoinedColumnTypeToNullIfNeeded(QueryTreeNodePtr & resolved_identifier, const JoinKind & join_kind, std::optional<JoinTableSide> resolved_side)
|
static void convertJoinedColumnTypeToNullIfNeeded(QueryTreeNodePtr & resolved_identifier, const JoinKind & join_kind, std::optional<JoinTableSide> resolved_side)
|
||||||
{
|
{
|
||||||
if (resolved_identifier->getNodeType() == QueryTreeNodeType::COLUMN &&
|
if (resolved_identifier->getNodeType() == QueryTreeNodeType::COLUMN &&
|
||||||
|
JoinCommon::canBecomeNullable(resolved_identifier->getResultType()) &&
|
||||||
(isFull(join_kind) ||
|
(isFull(join_kind) ||
|
||||||
(isLeft(join_kind) && resolved_side && *resolved_side == JoinTableSide::Right) ||
|
(isLeft(join_kind) && resolved_side && *resolved_side == JoinTableSide::Right) ||
|
||||||
(isRight(join_kind) && resolved_side && *resolved_side == JoinTableSide::Left)))
|
(isRight(join_kind) && resolved_side && *resolved_side == JoinTableSide::Left)))
|
||||||
|
Loading…
Reference in New Issue
Block a user