Skip to content

test: improve round sqllogictest coverage - #23973

Merged
neilconway merged 5 commits into
apache:mainfrom
2010YOUY01:codex/coverage-round
Jul 30, 2026
Merged

test: improve round sqllogictest coverage#23973
neilconway merged 5 commits into
apache:mainfrom
2010YOUY01:codex/coverage-round

Conversation

@2010YOUY01

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • Closes #.

Rationale for this change

Codecov reports low test coverage for this function, so this PR adds more SLT tests for it.

The tests were AI-generated, and I manually verified that the results are correct.

See Codecov bot comment -> ☔ View full report in Codecov by Harness -> Indirect Changes for the updated test coverage.

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions Bot added the sqllogictest SQL Logic Tests (.slt) label Jul 29, 2026
@codecov-commenter

codecov-commenter commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.80%. Comparing base (02a902c) to head (a3ec567).
⚠️ Report is 124 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23973      +/-   ##
==========================================
+ Coverage   80.71%   80.80%   +0.09%     
==========================================
  Files        1089     1096       +7     
  Lines      368293   373851    +5558     
  Branches   368293   373851    +5558     
==========================================
+ Hits       297250   302081    +4831     
- Misses      53332    53753     +421     
- Partials    17711    18017     +306     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@neilconway neilconway left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall lgtm. I notice that there are already some similar tests for round in scalar.slt; I wonder if we should consolidate these in a single place.

Comment on lines +165 to +172
query error DataFusion error:
SELECT round();

query error DataFusion error:
SELECT round(1, 2, 3);

query error DataFusion error:
SELECT round('x');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make the error matches more precise?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

----
120 -120 120 -120 120 120 120 120

# Round signed and unsigned integer arrays, including null and oversized scales

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'd benefit from another test row that checks oversized scales but does not have a NULL in column1 (since NULLs take a different code path). e.g., ('115', -20)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, updated.

@neilconway
neilconway added this pull request to the merge queue Jul 30, 2026
Merged via the queue into apache:main with commit 4651003 Jul 30, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants