test: improve round sqllogictest coverage - #23973
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
neilconway
left a comment
There was a problem hiding this comment.
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.
| query error DataFusion error: | ||
| SELECT round(); | ||
|
|
||
| query error DataFusion error: | ||
| SELECT round(1, 2, 3); | ||
|
|
||
| query error DataFusion error: | ||
| SELECT round('x'); |
There was a problem hiding this comment.
Can we make the error matches more precise?
| ---- | ||
| 120 -120 120 -120 120 120 120 120 | ||
|
|
||
| # Round signed and unsigned integer arrays, including null and oversized scales |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Good point, updated.
Which issue does this PR close?
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
Codecovbot comment ->☔ View full report in Codecov by Harness->Indirect Changesfor the updated test coverage.What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?