You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Mryange (via GitHub)" <gi...@apache.org> on 2026/10/16 06:28:25 UTC
[PR] [refactor](be) Strengthen enum type safety in execution and expressions [doris]
Mryange opened a new pull request, #69174:
URL: https://github.com/apache/doris/pull/69174
### What problem does this PR solve?
Issue Number: N/A
Problem Summary:
Root cause: unscoped enums implicitly convert to integers, and integer parameters accept unrelated enum values, weakening compile-time type checking in BE execution and expressions.
Use scoped enums for tablet routing, function state scope, and geometry types/statuses. Replace integer Hash Join template parameters and runtime-filter/WKB interfaces with their actual enum types, and update source, test, grammar, and benchmark callers. Use constexpr constants for scalar-group indexes and remove an unused JSON enum. Existing encoded values and DateTime value types remain unchanged.
### Release note
None
### Check List (For Author)
- Test:
- [x] No need to test or manual test. Explain why:
- [x] This is a refactor/code format and no logic has been changed in supported execution paths.
- [x] Previous test can cover this change.
- Validation: clang-format 16, git diff --check, and build-support/check-build-hygiene.sh passed. BE compilation, unit tests, regression tests, and clang-tidy have not been run locally.
- Behavior changed:
- [x] No.
- Does this need documentation?
- [x] No.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [refactor](be) Strengthen enum type safety in execution and expressions [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69174:
URL: https://github.com/apache/doris/pull/69174#issuecomment-6209537689
Thank you for your contribution to Apache Doris.
Don't know what should be done next? See [How to process your PR](https://doris.apache.org/community/how-to-contribute/review-and-ci).
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?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [refactor](be) Strengthen enum type safety in execution and expressions [doris]
Posted by "csun5285 (via GitHub)" <gi...@apache.org>.
csun5285 commented on PR #69174:
URL: https://github.com/apache/doris/pull/69174#issuecomment-6245500695
/review
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [refactor](be) Strengthen enum type safety in execution and expressions [doris]
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #69174:
URL: https://github.com/apache/doris/pull/69174
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [refactor](be) Strengthen enum type safety in execution and expressions [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69174:
URL: https://github.com/apache/doris/pull/69174#issuecomment-6214357133
# BE UT Coverage Report
Increment line coverage `64.71% (22/34)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/8342f80daa7735ce9846ed7857460d19e179b9d4_8342f80daa7735ce9846ed7857460d19e179b9d4/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/8342f80daa7735ce9846ed7857460d19e179b9d4_8342f80daa7735ce9846ed7857460d19e179b9d4/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 66.34% (31684/47760) |
| Line Coverage | 51.07% (333519/653006) |
| Region Coverage | 46.44% (269519/580388) |
| Branch Coverage | 48.14% (126850/263526) |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [refactor](be) Strengthen enum type safety in execution and expressions [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69174:
URL: https://github.com/apache/doris/pull/69174#issuecomment-6211508608
<details>
<summary>ClickBench: <b>Total hot run time: 24.71 s</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 8342f80daa7735ce9846ed7857460d19e179b9d4, data reload: false
query1 0.01 0.00 0.01
query2 0.09 0.05 0.06
query3 0.27 0.12 0.12
query4 1.60 0.12 0.12
query5 0.24 0.25 0.26
query6 1.18 0.68 0.70
query7 0.04 0.01 0.01
query8 0.05 0.04 0.04
query9 0.41 0.36 0.35
query10 0.59 0.57 0.62
query11 0.21 0.14 0.14
query12 0.19 0.15 0.14
query13 0.49 0.49 0.48
query14 1.03 1.01 1.03
query15 0.64 0.62 0.61
query16 0.35 0.36 0.35
query17 1.13 1.15 1.11
query18 0.23 0.21 0.21
query19 2.14 2.02 2.07
query20 0.02 0.02 0.01
query21 15.48 0.26 0.15
query22 4.39 0.06 0.05
query23 16.26 0.33 0.12
query24 3.23 0.74 0.45
query25 0.15 0.06 0.05
query26 1.56 0.27 0.15
query27 0.04 0.04 0.04
query28 1.67 0.66 0.40
query29 12.59 4.29 3.34
query30 0.28 0.15 0.14
query31 2.77 0.57 0.34
query32 3.22 0.63 0.51
query33 3.16 3.19 3.33
query34 15.40 4.03 3.38
query35 3.35 3.35 3.35
query36 0.55 0.42 0.48
query37 0.10 0.07 0.07
query38 0.04 0.04 0.03
query39 0.04 0.03 0.03
query40 0.17 0.15 0.14
query41 0.09 0.03 0.03
query42 0.04 0.03 0.03
query43 0.05 0.03 0.03
Total cold run time: 95.54 s
Total hot run time: 24.71 s
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [refactor](be) Strengthen enum type safety in execution and expressions [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69174:
URL: https://github.com/apache/doris/pull/69174#issuecomment-6214466178
# BE Regression && UT Coverage Report
Increment line coverage `70.59% (24/34)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/69174_8342f80daa7735ce9846ed7857460d19e179b9d4_merge/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/69174_8342f80daa7735ce9846ed7857460d19e179b9d4_merge/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 77.20% (35729/46284) |
| Line Coverage | 62.33% (402703/646033) |
| Region Coverage | 58.71% (339521/578310) |
| Branch Coverage | 59.67% (156878/262891) |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [refactor](be) Strengthen enum type safety in execution and expressions [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69174:
URL: https://github.com/apache/doris/pull/69174#issuecomment-6211423485
<details>
<summary>TPC-DS: <b>Total hot run time: 152308 ms</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 8342f80daa7735ce9846ed7857460d19e179b9d4, data reload: false
query5 4324 585 460 460
query6 434 207 192 192
query7 4795 445 232 232
query8 342 165 148 148
query9 8781 3943 4036 3943
query10 457 320 262 262
query11 6036 3833 3508 3508
query12 150 101 91 91
query13 1262 454 341 341
query14 6146 4142 3798 3798
query14_1 3491 3531 3519 3519
query15 209 198 182 182
query16 946 444 427 427
query17 843 663 543 543
query18 2426 425 319 319
query19 200 174 151 151
query20 89 85 83 83
query21 213 139 112 112
query22 13031 13001 12836 12836
query23 13501 12863 12490 12490
query23_1 12728 12553 12544 12544
query24 7091 823 469 469
query24_1 468 472 465 465
query25 533 427 362 362
query26 1284 255 141 141
query27 2779 440 272 272
query28 4603 1950 1963 1950
query29 1579 605 453 453
query30 301 220 177 177
query31 1011 921 847 847
query32 147 96 96 96
query33 551 305 252 252
query34 904 853 500 500
query35 752 761 642 642
query36 841 817 729 729
query37 133 108 96 96
query38 1791 1778 1698 1698
query39 793 826 753 753
query39_1 742 729 743 729
query40 225 115 98 98
query41 71 67 69 67
query42 84 85 84 84
query43 381 386 327 327
query44 1297 700 698 698
query45 186 198 164 164
query46 845 971 572 572
query47 2991 3052 2950 2950
query48 290 305 223 223
query49 572 412 294 294
query50 679 271 208 208
query51 10536 10684 10359 10359
query52 79 80 67 67
query53 190 207 150 150
query54 241 193 177 177
query55 71 67 60 60
query56 243 227 203 203
query57 1613 1631 1556 1556
query58 281 256 256 256
query59 2147 2183 2014 2014
query60 291 282 227 227
query61 142 149 148 148
query62 388 344 286 286
query63 194 168 159 159
query64 2718 957 772 772
query65 3282 3247 3222 3222
query66 1787 420 312 312
query67 20132 20226 19820 19820
query68 3050 1006 607 607
query69 380 297 248 248
query70 853 785 804 785
query71 308 238 208 208
query72 2691 2580 2319 2319
query73 522 517 295 295
query74 4609 4457 4320 4320
query75 2313 2308 1944 1944
query76 2298 1006 600 600
query77 336 361 298 298
query78 9835 9889 9186 9186
query79 951 861 533 533
query80 1439 435 344 344
query81 600 327 277 277
query82 617 137 108 108
query83 280 201 179 179
query84 310 121 103 103
query85 1102 435 389 389
query86 429 243 225 225
query87 2035 1961 1802 1802
query88 3619 2700 2675 2675
query89 339 300 262 262
query90 1805 184 186 184
query91 164 153 128 128
query92 102 92 89 89
query93 1028 1010 595 595
query94 629 301 254 254
query95 599 345 377 345
query96 658 521 232 232
query97 2490 2431 2361 2361
query98 170 150 144 144
query99 780 778 665 665
Total cold run time: 235818 ms
Total hot run time: 152308 ms
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [refactor](be) Strengthen enum type safety in execution and expressions [doris]
Posted by "Mryange (via GitHub)" <gi...@apache.org>.
Mryange commented on PR #69174:
URL: https://github.com/apache/doris/pull/69174#issuecomment-6209618164
/review
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [refactor](be) Strengthen enum type safety in execution and expressions [doris]
Posted by "Mryange (via GitHub)" <gi...@apache.org>.
Mryange commented on PR #69174:
URL: https://github.com/apache/doris/pull/69174#issuecomment-6209891855
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [refactor](be) Strengthen enum type safety in execution and expressions [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69174:
URL: https://github.com/apache/doris/pull/69174#issuecomment-6211249472
<details>
<summary>TPC-H: <b>Total hot run time: 29593 ms</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 8342f80daa7735ce9846ed7857460d19e179b9d4, data reload: false
------ Round 1 ----------------------------------
============================================
q1 17624 5595 5558 5558
q2 2113 327 258 258
q3 10213 1407 842 842
q4 4681 472 341 341
q5 7451 800 542 542
q6 193 193 158 158
q7 783 794 600 600
q8 9256 1384 1093 1093
q9 5787 4285 4282 4282
q10 6834 1301 1027 1027
q11 427 257 232 232
q12 642 394 301 301
q13 18080 3605 3048 3048
q14 275 275 250 250
q15 q16 735 736 664 664
q17 1183 763 576 576
q18 7055 6246 6182 6182
q19 1105 958 597 597
q20 380 333 233 233
q21 5427 2526 2590 2526
q22 405 350 283 283
Total cold run time: 100649 ms
Total hot run time: 29593 ms
----- Round 2, with runtime_filter_mode=off -----
============================================
q1 6539 6530 6566 6530
q2 728 627 587 587
q3 5568 5725 5344 5344
q4 2113 2166 1575 1575
q5 5857 5730 5553 5553
q6 264 221 164 164
q7 2280 2026 1855 1855
q8 3157 2754 2782 2754
q9 8173 7955 7630 7630
q10 3660 3599 3198 3198
q11 596 409 381 381
q12 650 692 504 504
q13 3257 3610 3075 3075
q14 283 290 260 260
q15 q16 657 677 612 612
q17 7852 7058 6872 6872
q18 13195 12320 13194 12320
q19 937 811 803 803
q20 2198 2168 1954 1954
q21 5835 4888 4839 4839
q22 516 464 416 416
Total cold run time: 74315 ms
Total hot run time: 67226 ms
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org