Skip to content

Commit

Permalink
remove checkout prefect block
Browse files Browse the repository at this point in the history
  • Loading branch information
zhyass committed Oct 15, 2023
1 parent 54ec398 commit 3053396
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/query/expression/src/utils/block_thresholds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ impl BlockThresholds {
}
}

#[inline]
pub fn check_perfect_block(&self, row_count: usize, block_size: usize) -> bool {
row_count <= self.max_rows_per_block && self.check_large_enough(row_count, block_size)
}

#[inline]
pub fn check_large_enough(&self, row_count: usize, block_size: usize) -> bool {
row_count >= self.min_rows_per_block || block_size >= self.max_bytes_per_block
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl Compactor for BlockCompactor {
// perfect block
if self
.thresholds
.check_perfect_block(block.num_rows(), block.memory_size())
.check_large_enough(block.num_rows(), block.memory_size())
{
res.push(block);
blocks.remove(size - 1);
Expand Down Expand Up @@ -109,7 +109,7 @@ impl Compactor for BlockCompactor {
// Perfect block, no need to compact
if self
.thresholds
.check_perfect_block(block.num_rows(), block.memory_size())
.check_large_enough(block.num_rows(), block.memory_size())
{
res.push(block.clone());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ impl ClusterStatsGenerator {
let level = if min == max
&& self
.block_thresholds
.check_perfect_block(data_block.num_rows(), data_block.memory_size())
.check_large_enough(data_block.num_rows(), data_block.memory_size())
{
-1
} else {
Expand Down

0 comments on commit 3053396

Please sign in to comment.