Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhyass committed Jan 20, 2025
1 parent d24c269 commit 7113899
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use databend_common_exception::Result;
use databend_common_expression::BlockThresholds;
use databend_common_expression::Column;
use databend_common_expression::DataBlock;
use databend_common_expression::Scalar;
use databend_common_expression::Value;
use databend_common_pipeline_core::Pipeline;

Expand Down Expand Up @@ -120,13 +121,10 @@ pub(crate) fn memory_size(data_block: &DataBlock) -> usize {
data_block
.columns()
.iter()
.map(|entry| {
if let Value::Column(Column::Nullable(col)) = &entry.value {
if col.validity.true_count() == 0 {
return num_rows;
}
}
entry.memory_size()
.map(|entry| match &entry.value {
Value::Column(Column::Nullable(col)) if col.validity.true_count() == 0 => num_rows,
Value::Scalar(Scalar::Null) => num_rows,
_ => entry.memory_size(),
})
.sum()
}

0 comments on commit 7113899

Please sign in to comment.