Skip to content

fix(datasource): keep stats absent when collect_stats is false#21149

Open
kumarUjjawal wants to merge 1 commit intoapache:mainfrom
kumarUjjawal:fix/collect_stat
Open

fix(datasource): keep stats absent when collect_stats is false#21149
kumarUjjawal wants to merge 1 commit intoapache:mainfrom
kumarUjjawal:fix/collect_stat

Conversation

@kumarUjjawal
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

get_statistics_with_limit was copying first-file row/byte stats even whencollect_stats=false. This could return Exact(0) instead of Absent (unknown stats).

What changes are included in this PR?

Summary stats are only initialized and merged when collect_stats=true. Also fixes first-file column byte_size initialization in the collect_stats=true path, and adds regression tests for both paths and limit behavior.

Are these changes tested?

Yes

Are there any user-facing changes?

@github-actions github-actions bot added the datasource Changes to the datasource crate label Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

datasource Changes to the datasource crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: fix case where num_rows and total_byte_size are not defined (stat should be None instead of Some(0))

1 participant