Skip to content

Commit

Permalink
Fix num row statistics
Browse files Browse the repository at this point in the history
Signed-off-by: Linwei Zhang<[email protected]>
Signed-off-by: 张林伟 <[email protected]>
  • Loading branch information
lewiszlw authored and rtyler committed Nov 22, 2024
1 parent cb80931 commit cd9c9d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/core/src/kernel/snapshot/log_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,9 @@ mod datafusion {
fn collect_count(&self, name: &str) -> Precision<usize> {
let num_records = extract_and_cast_opt::<Int64Array>(self.stats, name);
if let Some(num_records) = num_records {
if let Some(null_count_mulls) = num_records.nulls() {
if num_records.len() == 0 {
Precision::Exact(0)
} else if let Some(null_count_mulls) = num_records.nulls() {
if null_count_mulls.null_count() > 0 {
Precision::Absent
} else {
Expand Down

0 comments on commit cd9c9d5

Please sign in to comment.