mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-26 19:50:51 +00:00
Add reqired right keys to join totals block
This commit is contained in:
parent
91330be0af
commit
a61b7f2326
@ -329,8 +329,12 @@ void joinTotals(const Block & totals, const Block & columns_to_add, const TableJ
|
||||
|
||||
if (Block totals_without_keys = totals)
|
||||
{
|
||||
const auto & required_right = table_join.requiredRightKeys();
|
||||
for (const auto & name : table_join.keyNamesRight())
|
||||
{
|
||||
if (!required_right.contains(name))
|
||||
totals_without_keys.erase(totals_without_keys.getPositionByName(name));
|
||||
}
|
||||
|
||||
for (auto & col : totals_without_keys)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user