MCPcopy Create free account
hub / github.com/ByConity/ByConity / initRightBlockStructure

Method initRightBlockStructure

src/Interpreters/HashJoin.cpp:689–709  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

687}
688
689void HashJoin::initRightBlockStructure(Block & saved_block_sample)
690{
691 /// We could remove key columns for LEFT | INNER HashJoin but we should keep them for JoinSwitcher (if any).
692 bool save_key_columns = !table_join->forceHashJoin() || isRightOrFull(kind) || table_join->getRuntimeFilterConsumer() != nullptr;
693 if (save_key_columns)
694 {
695 saved_block_sample = right_table_keys.cloneEmpty();
696 }
697 else if (strictness == ASTTableJoin::Strictness::Asof)
698 {
699 /// Save ASOF key
700 saved_block_sample.insert(right_table_keys.safeGetByPosition(right_table_keys.columns() - 1));
701 }
702
703 /// Save non key columns
704 for (auto & column : sample_block_with_columns_to_add)
705 saved_block_sample.insert(column);
706
707 if (nullable_right_side)
708 JoinCommon::convertColumnsToNullable(saved_block_sample, (isFull(kind) ? right_table_keys.columns() : 0));
709}
710
711Block HashJoin::structureRightBlock(const Block & block) const
712{

Callers

nothing calls this directly

Calls 8

isRightOrFullFunction · 0.85
convertColumnsToNullableFunction · 0.85
isFullFunction · 0.85
forceHashJoinMethod · 0.80
columnsMethod · 0.80
cloneEmptyMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected