fix style

This commit is contained in:
lgbo-ustc 2024-06-06 10:40:25 +08:00
parent 6d3836aca4
commit 5aa99f88fe
3 changed files with 45 additions and 2919 deletions

File diff suppressed because it is too large Load Diff

View File

@ -536,6 +536,7 @@ bool HashJoin::addBlockToJoin(const Block & source_block_, bool check_limits)
|| (min_rows_to_compress && getTotalRowCount() >= min_rows_to_compress)))
{
block_to_save = block_to_save.compress();
have_compressed = true;
}
data->blocks_allocated_size += block_to_save.allocatedBytes();
@ -762,14 +763,18 @@ void HashJoin::joinBlockImplCross(Block & block, ExtraBlockPtr & not_processed)
}
};
for (const Block & compressed_block_right : data->blocks)
for (const Block & block_right : data->blocks)
{
++block_number;
if (block_number < start_right_block)
continue;
auto block_right = compressed_block_right.decompress();
/// The following statement cannot be substituted with `process_right_block(!have_compressed ? block_right : block_right.decompress())`
/// because it will lead to copying of `block_right` even if its branch is taken (because common type of `block_right` and `block_right.decompress()` is `Block`).
if (!have_compressed)
process_right_block(block_right);
else
process_right_block(block_right.decompress());
if (rows_added > max_joined_block_rows)
{
break;

View File

@ -821,11 +821,9 @@ private:
{
// Add a check for current_added_rows to avoid run the filter expression on too small size batch.
if (total_added_rows >= max_joined_block_rows || current_added_rows < 1024)
{
exceeded_max_block_rows = true;
}
}
}
if constexpr (need_replication)
{