Skip to content

Conversation

@wumeibanfa
Copy link
Contributor

What problem does this PR solve?

go through whole be/ and find all const_cast

Issue Number: #55057

Problem Summary:

  1. remove useless const_cast
  2. explain why using const_cast does not result in undefined behavior
  3. don't modify some const_cast
    (1) some code in DBUG_EXECUTE_IF or test file
    (2) underlying data structures, such as cow
    (3) const_cast<const T*>

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@wumeibanfa
Copy link
Contributor Author

run buildall

@Thearas
Copy link
Contributor

Thearas commented Sep 29, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@doris-robot
Copy link

ClickBench: Total hot run time: 30.09 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 8b763704100c5622282d603cd2e0d5430b5ce5bb, data reload: false

query1	0.06	0.04	0.05
query2	0.09	0.05	0.06
query3	0.26	0.10	0.08
query4	1.61	0.12	0.11
query5	0.27	0.26	0.25
query6	1.18	0.66	0.64
query7	0.03	0.03	0.03
query8	0.06	0.05	0.05
query9	0.63	0.53	0.52
query10	0.58	0.58	0.59
query11	0.19	0.11	0.11
query12	0.16	0.12	0.12
query13	0.63	0.63	0.62
query14	1.02	1.04	1.04
query15	0.86	0.85	0.89
query16	0.41	0.39	0.40
query17	1.02	1.07	1.04
query18	0.22	0.20	0.20
query19	1.95	1.87	1.88
query20	0.02	0.01	0.01
query21	15.42	0.95	0.58
query22	0.76	1.14	0.66
query23	15.01	1.37	0.63
query24	7.01	1.58	0.37
query25	0.47	0.10	0.13
query26	0.70	0.17	0.13
query27	0.07	0.06	0.06
query28	9.28	1.36	0.92
query29	12.57	4.00	3.34
query30	0.27	0.12	0.12
query31	2.83	0.60	0.38
query32	3.23	0.57	0.47
query33	3.18	3.13	3.20
query34	16.14	5.47	4.84
query35	4.87	4.89	4.87
query36	0.70	0.52	0.50
query37	0.10	0.07	0.07
query38	0.07	0.05	0.05
query39	0.04	0.03	0.02
query40	0.16	0.15	0.15
query41	0.10	0.04	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 104.31 s
Total hot run time: 30.09 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 69.23% (9/13) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.42% (17638/33645)
Line Coverage 37.63% (160224/425739)
Region Coverage 32.13% (122216/380389)
Branch Coverage 33.53% (53617/159927)

@wumeibanfa wumeibanfa closed this Sep 29, 2025
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.

3 participants