Chore: Code hygiene - warn-numeric-widen
Which issue does this PR close?
This PR aims to address the -Wnumeric-widen warning in the codebase.
As the overall scope of strict-warning compliance is quite large, this change focuses on resolving this specific warning type as a first step. Future PRs will continue addressing other warning incrementally.
Partially closes #. https://github.com/apache/datafusion-comet/issues/2255
Rationale for this change
To clean up the code as per static check with the hope to resolve all warning and promote the restrict warning profile for the default CI build to uphold Scala code quality.
What changes are included in this PR?
To perform explicit type conversion instead of relying on runtime implicit cast.
How are these changes tested?
- Code can now compile with
-Wnumeric-widenoption on. - CI continue to pass
Codecov Report
:x: Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 58.45%. Comparing base (f09f8af) to head (4fa23a7).
:warning: Report is 709 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...e/spark/sql/comet/CometBroadcastExchangeExec.scala | 0.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #2588 +/- ##
============================================
+ Coverage 56.12% 58.45% +2.33%
- Complexity 976 1456 +480
============================================
Files 119 159 +40
Lines 11743 13892 +2149
Branches 2251 2375 +124
============================================
+ Hits 6591 8121 +1530
- Misses 4012 4570 +558
- Partials 1140 1201 +61
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@comphead @mbutrovich I have removed some explicit conversions and added a suppression instead, as it seems more appropriate. Would you mind to trigger the CI for this PR? Thx!