Skip to content

return NOT_EVALUATED for percent checks#2708

Open
bujjibabukatta wants to merge 1 commit into
sodadata:mainfrom
bujjibabukatta:fix/2407_missing_percent
Open

return NOT_EVALUATED for percent checks#2708
bujjibabukatta wants to merge 1 commit into
sodadata:mainfrom
bujjibabukatta:fix/2407_missing_percent

Conversation

@bujjibabukatta
Copy link
Copy Markdown

fix: return NOT_EVALUATED for percent checks when row_count is zero

When a filter excludes all rows (row_count = 0), percent-based checks
(missing_percent, invalid_percent) previously computed 0.0 and evaluated
the threshold against it, causing unexpected FAILED results.

Return None from DerivedPercentageMetricImpl when total is 0 so that
evaluate_threshold correctly returns NOT_EVALUATED instead.

Fixes #2407

evaluate_threshold correctly returns NOT_EVALUATED instead.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 17, 2026

CLA assistant check
All committers have signed the CLA.

@sonarqubecloud
Copy link
Copy Markdown

@bujjibabukatta
Copy link
Copy Markdown
Author

can you please verify pull request and merge it @Niels-b

@bujjibabukatta
Copy link
Copy Markdown
Author

can you please verify and merge pull request @CLAassistant .

@bujjibabukatta
Copy link
Copy Markdown
Author

Hi @Niels-b @m1n0 could you please take a look at this PR

Pre-commit CI is failing due to a pre-existing issue in
contract_verification_impl.py — Black crashes with
module 'ast' has no attribute 'Str' in the CI environment.
This is unrelated to the changes in this PR. Running Black
locally shows 1 file left unchanged.

Can a maintainer advise or re-run CI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

missing_percent unexpected output after filtering all rows

4 participants