Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
baibaichen authored Apr 12, 2024
1 parent fd06368 commit a06a2fd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cpp-ch/local-engine/Parser/JoinRelParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,16 @@ DB::QueryPlanPtr JoinRelParser::parseJoin(const substrait::JoinRel & join, DB::Q

void JoinRelParser::addConvertStep(TableJoin & table_join, DB::QueryPlan & left, DB::QueryPlan & right)
{

/// After https://github.com/ClickHouse/ClickHouse/pull/61216, We will failed at tryPushDownFilter() in filterPushDown.cpp
/// Here is a workaround, refer to chooseJoinAlgorithm() in PlannerJoins.cpp, it always call TableJoin::setRename to
/// create aliases for columns in the right table
/// By using right table header name sets, so TableJoin::deduplicateAndQualifyColumnNames can do same thing as chooseJoinAlgorithm()
///
/// Affected UT fixed bh this workaround:
/// GlutenClickHouseTPCHParquetRFSuite:TPCH Q17, Q19, Q20, Q21
NameSet left_columns_set;
for (const auto & col : left.getCurrentDataStream().header.getNames())
for (const auto & col : right.getCurrentDataStream().header.getNames())
{
left_columns_set.emplace(col);
}
Expand Down

0 comments on commit a06a2fd

Please sign in to comment.