[refactor](be) Remove redundant casts from BE code#64087
Conversation
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Remove redundant casts reported by clang-tidy readability-redundant-casting in BE code. These casts were no-op conversions to the same type, including redundant static_cast, reinterpret_cast, and C-style casts. The change keeps casts that still perform real type conversion and only removes the redundant outer casts reported by clang-tidy.
### Release note
None
### Check List (For Author)
- Test: Static analysis / Build
- Ran clang-tidy readability-redundant-casting on the modified BE files; no remaining readability-redundant-casting warnings were reported.
- Ran clang-format-16 on modified BE files.
- Ran git diff --check -- be/src.
- Ran sh build.sh --be -j48, build succeeded with "Successfully build Doris".
- Behavior changed: No
- Does this need documentation: No
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
/review |
There was a problem hiding this comment.
Review result: no blocking issues found.
Critical checkpoint conclusions:
- Goal and tests: The PR is a narrow BE refactor to remove clang-tidy readability-redundant-casting findings. The changed sites accomplish that goal without observable semantic changes; the PR states clang-tidy, clang-format, diff check, and BE build were run.
- Scope and clarity: The modification is small and focused on redundant casts only.
- Concurrency and lifecycle: No new shared state, locks, threads, or lifecycle ownership changes were introduced.
- Configuration and compatibility: No new configuration, protocol, storage format, or function-symbol compatibility changes were introduced.
- Parallel code paths: The changes are mechanical across independent call sites; no functional path appears partially updated.
- Conditional checks and error handling: No new conditional checks or error-handling paths were introduced. The removed static_cast in ColumnVariant::finalize discards a void return, not a Status.
- Test coverage: No new functional tests are needed for this no-behavior refactor; build/static-analysis coverage is appropriate for this scope.
- Observability, transactions, and data writes: No logging/metrics, transaction, persistence, or data-write behavior changes were introduced.
- FE/BE variable passing: No transmitted variables or thrift/interface data paths were changed.
- Performance: No new allocations or redundant work were introduced; the changes are neutral.
Focus points: No additional user-provided review focus was specified.
|
run buildall |
TPC-H: Total hot run time: 29328 ms |
TPC-DS: Total hot run time: 169785 ms |
|
run buildall |
TPC-H: Total hot run time: 29514 ms |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
TPC-DS: Total hot run time: 169153 ms |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
What problem does this PR solve?
Problem Summary: Remove redundant casts reported by clang-tidy readability-redundant-casting in BE code. These casts were no-op conversions to the same type, including redundant static_cast, reinterpret_cast, and C-style casts. The change keeps casts that still perform real type conversion and only removes the redundant outer casts reported by clang-tidy.
Release note
None
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)