Skip to content

branch-4.0: [fix] remove useless const_cast and explain const_cast for vec (1) #56587 - #56664

Merged
yiguolei merged 1 commit into
branch-4.0from
auto-pick-56587-branch-4.0
Sep 30, 2025
Merged

yiguolei merged 1 commit into
branch-4.0from
auto-pick-56587-branch-4.0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #56587

…56587)

 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*>
@Thearas

Thearas commented Sep 30, 2025

Copy link
Copy Markdown
Contributor

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?

@dataroaring dataroaring reopened this Sep 30, 2025
@Thearas

Thearas commented Sep 30, 2025

Copy link
Copy Markdown
Contributor

run buildall

@yiguolei
yiguolei merged commit 77fedd8 into branch-4.0 Sep 30, 2025
2 of 5 checks passed
@doris-robot

Copy link
Copy Markdown
ClickBench: Total hot run time: 29.96 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 95bb67c16a452853691322bf3a3713fc87cfbed7, data reload: true

query1	0.04	0.04	0.03
query2	0.10	0.04	0.04
query3	0.28	0.07	0.07
query4	1.74	0.12	0.11
query5	0.26	0.25	0.26
query6	1.25	0.65	0.65
query7	0.02	0.02	0.02
query8	0.06	0.04	0.04
query9	0.64	0.53	0.52
query10	0.59	0.57	0.58
query11	0.18	0.10	0.11
query12	0.16	0.11	0.11
query13	0.64	0.61	0.62
query14	0.79	0.82	0.82
query15	0.87	0.85	0.83
query16	0.42	0.40	0.39
query17	1.05	1.03	1.04
query18	0.20	0.20	0.20
query19	1.89	1.84	1.79
query20	0.02	0.01	0.01
query21	15.46	0.92	0.56
query22	0.81	1.13	0.70
query23	15.04	1.35	0.63
query24	4.97	0.74	0.25
query25	0.16	0.05	0.08
query26	0.32	0.15	0.13
query27	0.05	0.04	0.04
query28	12.39	1.44	0.94
query29	12.73	3.82	3.20
query30	0.30	0.12	0.11
query31	3.01	0.62	0.41
query32	3.48	0.57	0.51
query33	3.24	3.27	3.39
query34	17.60	5.75	5.05
query35	5.06	5.09	5.09
query36	0.72	0.50	0.50
query37	0.09	0.07	0.06
query38	0.08	0.04	0.04
query39	0.04	0.02	0.03
query40	0.16	0.14	0.14
query41	0.08	0.03	0.02
query42	0.04	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 107.07 s
Total hot run time: 29.96 s

@morningman
morningman deleted the auto-pick-56587-branch-4.0 branch July 8, 2026 14:08
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.

5 participants