Skip to content

Commit ac48846

Browse files
authored
Merge pull request ClickHouse#79035 from yariks5s/check_rows_while_dispatching_blocks
Minor: Do not add empty blocks to join while using ConcurrentHashJoin
2 parents c7357e5 + 4c5e98e commit ac48846

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Interpreters/ConcurrentHashJoin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ bool ConcurrentHashJoin::addBlockToJoin(const Block & right_block_, bool check_l
251251
size_t blocks_left = 0;
252252
for (const auto & block : dispatched_blocks)
253253
{
254-
if (block)
254+
if (block.rows())
255255
{
256256
++blocks_left;
257257
}
@@ -265,7 +265,7 @@ bool ConcurrentHashJoin::addBlockToJoin(const Block & right_block_, bool check_l
265265
auto & hash_join = hash_joins[i];
266266
auto & dispatched_block = dispatched_blocks[i];
267267

268-
if (dispatched_block)
268+
if (dispatched_block.rows())
269269
{
270270
/// if current hash_join is already processed by another thread, skip it and try later
271271
std::unique_lock<std::mutex> lock(hash_join->mutex, std::try_to_lock);

0 commit comments

Comments
 (0)