diff --git a/src/Interpreters/HashJoin/HashJoin.cpp b/src/Interpreters/HashJoin/HashJoin.cpp index b7355f72161..db6dd58f282 100644 --- a/src/Interpreters/HashJoin/HashJoin.cpp +++ b/src/Interpreters/HashJoin/HashJoin.cpp @@ -438,7 +438,7 @@ bool HashJoin::isUsedByAnotherAlgorithm() const bool HashJoin::canRemoveColumnsFromLeftBlock() const { - return table_join->enableEnalyzer() && !table_join->hasUsing() && !isUsedByAnotherAlgorithm(); + return table_join->enableEnalyzer() && !table_join->hasUsing() && !isUsedByAnotherAlgorithm() && strictness != JoinStrictness::RightAny; } void HashJoin::initRightBlockStructure(Block & saved_block_sample)