You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "airborne12 (via GitHub)" <gi...@apache.org> on 2026/03/21 16:51:17 UTC
[PR] [fix](inverted index) Fix BUILD INDEX producing inconsistent query results with multiple analyzers [doris]
airborne12 opened a new pull request, #61596:
URL: https://github.com/apache/doris/pull/61596
## Summary
- Fixed a bug where sequential `BUILD INDEX` operations with multiple analyzers on the same column produce query results inconsistent with tables having indexes defined at creation time
- Root cause: `BUILD INDEX` appends indexes in execution order, not tablet schema order. `select_best_reader()` picks the first matching index, so different rowsets select different indexes for the same query
- Fix: reorder output rowset schema indexes to match tablet schema order after each build via new `TabletSchema::reorder_indexes_by()`
## Test plan
- [x] Unit tests: `TestReorderIndexesBy`, `TestReorderIndexesByWithExtraIndexes` in `tablet_schema_index_test.cpp`
- [x] Regression test: `test_build_index_multi_analyzer_order` - validates build index path matches direct-insert baseline for regex queries across multiple analyzers
- [x] Manual verification with wikipedia dataset (1M rows) confirming fix resolves DORIS-24685
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4105328639
<details>
<summary>TPC-DS: <b>Total hot run time: 169227 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 ff6281f676ab2deb199d07241a8e1a8c6b9df9cc, data reload: false
query5 4367 614 494 494
query6 340 238 217 217
query7 4219 467 275 275
query8 349 246 236 236
query9 8741 2738 2714 2714
query10 536 396 357 357
query11 7026 5060 4919 4919
query12 183 134 127 127
query13 1278 498 347 347
query14 5748 3755 3539 3539
query14_1 2852 2866 2813 2813
query15 206 193 180 180
query16 972 483 447 447
query17 1127 732 629 629
query18 2467 457 354 354
query19 219 212 190 190
query20 137 126 128 126
query21 214 139 114 114
query22 13526 14434 14772 14434
query23 16267 15887 15685 15685
query23_1 15895 15816 16253 15816
query24 7206 1654 1225 1225
query24_1 1254 1252 1249 1249
query25 619 475 410 410
query26 1242 269 150 150
query27 2751 484 294 294
query28 4439 1799 1837 1799
query29 823 567 469 469
query30 301 223 192 192
query31 995 946 870 870
query32 82 72 72 72
query33 516 330 274 274
query34 878 884 522 522
query35 660 688 599 599
query36 1084 1117 960 960
query37 133 97 80 80
query38 2937 2971 2840 2840
query39 840 835 814 814
query39_1 793 797 794 794
query40 235 153 136 136
query41 64 61 59 59
query42 262 255 252 252
query43 249 251 220 220
query44
query45 199 195 181 181
query46 885 1003 620 620
query47 2155 2108 2426 2108
query48 324 313 224 224
query49 616 485 386 386
query50 678 272 211 211
query51 4032 4029 4048 4029
query52 265 260 259 259
query53 293 335 290 290
query54 299 268 267 267
query55 92 87 87 87
query56 318 321 327 321
query57 1933 1869 1787 1787
query58 286 295 269 269
query59 2789 2972 2747 2747
query60 346 342 325 325
query61 148 155 159 155
query62 629 587 500 500
query63 309 283 275 275
query64 4988 1290 1024 1024
query65
query66 1455 453 367 367
query67 24198 24272 24166 24166
query68
query69 411 323 289 289
query70 930 940 876 876
query71 331 312 301 301
query72 2796 2712 2436 2436
query73 555 545 331 331
query74 9554 9602 9395 9395
query75 2858 2783 2471 2471
query76 2304 1027 669 669
query77 384 387 314 314
query78 10976 11093 10529 10529
query79 3079 807 565 565
query80 1792 627 557 557
query81 578 255 225 225
query82 1003 155 122 122
query83 333 265 246 246
query84 263 125 96 96
query85 926 496 454 454
query86 486 304 331 304
query87 3145 3117 3002 3002
query88 3573 2674 2671 2671
query89 428 366 346 346
query90 2089 177 166 166
query91 173 170 140 140
query92 84 76 74 74
query93 1455 809 501 501
query94 649 315 289 289
query95 595 340 326 326
query96 632 518 224 224
query97 2502 2476 2389 2389
query98 238 219 227 219
query99 1037 1006 928 928
Total cold run time: 253009 ms
Total hot run time: 169227 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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4114794752
PR approved by anyone and no changes requested.
--
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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4105566815
# BE UT Coverage Report
Increment line coverage ` ` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/4bfa7c5cffc38c4f23f5b8ed3dce047a54e14fda_4bfa7c5cffc38c4f23f5b8ed3dce047a54e14fda/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/4bfa7c5cffc38c4f23f5b8ed3dce047a54e14fda_4bfa7c5cffc38c4f23f5b8ed3dce047a54e14fda/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 52.83% (19862/37597) |
| Line Coverage | 36.29% (185307/510634) |
| Region Coverage | 32.54% (143516/440988) |
| Branch Coverage | 33.76% (62857/186212) |
--
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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "airborne12 (via GitHub)" <gi...@apache.org>.
airborne12 commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4105401204
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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4105680617
# BE Regression && UT Coverage Report
Increment line coverage `100% (0/0)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/61596_4bfa7c5cffc38c4f23f5b8ed3dce047a54e14fda_merge/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/61596_4bfa7c5cffc38c4f23f5b8ed3dce047a54e14fda_merge/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 73.43% (27021/36800) |
| Line Coverage | 56.84% (289291/508924) |
| Region Coverage | 54.26% (241475/445039) |
| Branch Coverage | 55.94% (104442/186700) |
--
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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4105287593
<details>
<summary>TPC-H: <b>Total hot run time: 26980 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 ff6281f676ab2deb199d07241a8e1a8c6b9df9cc, data reload: false
------ Round 1 ----------------------------------
orders Doris NULL NULL 0 0 0 NULL 0 NULL NULL 2023-12-26 18:27:23 2023-12-26 18:42:55 NULL utf-8 NULL NULL
============================================
q1 17607 4481 4297 4297
q2 q3 10643 771 524 524
q4 4675 353 252 252
q5 7564 1201 1017 1017
q6 174 173 147 147
q7 775 868 680 680
q8 9558 1463 1384 1384
q9 5121 4672 4717 4672
q10 6338 1913 1648 1648
q11 495 264 248 248
q12 737 585 489 489
q13 18045 2885 2189 2189
q14 237 242 213 213
q15 q16 734 733 676 676
q17 739 832 471 471
q18 5907 5417 5219 5219
q19 1414 986 624 624
q20 529 497 377 377
q21 4526 1890 1594 1594
q22 482 362 259 259
Total cold run time: 96300 ms
Total hot run time: 26980 ms
----- Round 2, with runtime_filter_mode=off -----
orders Doris NULL NULL 150000000 42 6422171781 NULL 22778155 NULL NULL 2023-12-26 18:27:23 2023-12-26 18:42:55 NULL utf-8 NULL NULL
============================================
q1 4753 4697 4691 4691
q2 q3 3874 4382 3874 3874
q4 908 1229 821 821
q5 4183 4510 4341 4341
q6 183 176 144 144
q7 1755 1612 1504 1504
q8 2551 2713 2578 2578
q9 7537 7344 7407 7344
q10 3906 4112 3633 3633
q11 498 434 425 425
q12 539 577 463 463
q13 2922 3178 2309 2309
q14 298 315 284 284
q15 q16 818 791 718 718
q17 1171 1334 1389 1334
q18 7072 6678 6661 6661
q19 911 961 900 900
q20 2099 2142 2008 2008
q21 3935 3561 3376 3376
q22 458 426 382 382
Total cold run time: 50371 ms
Total hot run time: 47790 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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4106303299
# BE UT Coverage Report
Increment line coverage ` ` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/4e00240612a29fceacd3d7c6f3928c5ba87a6616_4e00240612a29fceacd3d7c6f3928c5ba87a6616/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/4e00240612a29fceacd3d7c6f3928c5ba87a6616_4e00240612a29fceacd3d7c6f3928c5ba87a6616/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 52.79% (19849/37597) |
| Line Coverage | 36.27% (185185/510634) |
| Region Coverage | 32.56% (143580/440988) |
| Branch Coverage | 33.73% (62815/186212) |
--
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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4106235389
<details>
<summary>TPC-H: <b>Total hot run time: 26874 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 4e00240612a29fceacd3d7c6f3928c5ba87a6616, data reload: false
------ Round 1 ----------------------------------
orders Doris NULL NULL 0 0 0 NULL 0 NULL NULL 2023-12-26 18:27:23 2023-12-26 18:42:55 NULL utf-8 NULL NULL
============================================
q1 17630 4460 4323 4323
q2 q3 10645 749 519 519
q4 4678 351 251 251
q5 7553 1225 1023 1023
q6 175 176 149 149
q7 787 881 684 684
q8 9719 1474 1347 1347
q9 5190 4772 4650 4650
q10 6313 1936 1671 1671
q11 490 258 254 254
q12 762 583 476 476
q13 18051 2980 2175 2175
q14 232 235 213 213
q15 q16 738 767 666 666
q17 747 854 418 418
q18 5829 5433 5219 5219
q19 1117 987 591 591
q20 546 492 373 373
q21 4574 1852 1539 1539
q22 444 397 333 333
Total cold run time: 96220 ms
Total hot run time: 26874 ms
----- Round 2, with runtime_filter_mode=off -----
orders Doris NULL NULL 150000000 42 6422171781 NULL 22778155 NULL NULL 2023-12-26 18:27:23 2023-12-26 18:42:55 NULL utf-8 NULL NULL
============================================
q1 4806 4551 4583 4551
q2 q3 3824 4496 3928 3928
q4 908 1247 804 804
q5 4123 4373 4322 4322
q6 186 183 146 146
q7 1751 1620 1519 1519
q8 2544 2714 2545 2545
q9 7636 7559 7413 7413
q10 3781 4004 3577 3577
q11 505 449 437 437
q12 484 592 459 459
q13 2840 3168 2393 2393
q14 287 296 274 274
q15 q16 744 898 893 893
q17 1200 1391 1396 1391
q18 7275 6705 6765 6705
q19 929 955 960 955
q20 2120 2177 2031 2031
q21 4014 3548 3393 3393
q22 480 432 405 405
Total cold run time: 50437 ms
Total hot run time: 48141 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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4105454328
<details>
<summary>TPC-H: <b>Total hot run time: 26707 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 4bfa7c5cffc38c4f23f5b8ed3dce047a54e14fda, data reload: false
------ Round 1 ----------------------------------
orders Doris NULL NULL 0 0 0 NULL 0 NULL NULL 2023-12-26 18:27:23 2023-12-26 18:42:55 NULL utf-8 NULL NULL
============================================
q1 17577 4435 4292 4292
q2 q3 10641 765 527 527
q4 4683 367 251 251
q5 7573 1230 1043 1043
q6 182 174 148 148
q7 769 846 673 673
q8 9302 1495 1342 1342
q9 5012 4715 4666 4666
q10 6304 1929 1656 1656
q11 500 248 246 246
q12 766 576 459 459
q13 18040 2909 2177 2177
q14 225 243 214 214
q15 q16 766 741 657 657
q17 748 821 478 478
q18 6091 5397 5141 5141
q19 1152 990 626 626
q20 554 483 376 376
q21 4521 1851 1434 1434
q22 562 406 301 301
Total cold run time: 95968 ms
Total hot run time: 26707 ms
----- Round 2, with runtime_filter_mode=off -----
orders Doris NULL NULL 150000000 42 6422171781 NULL 22778155 NULL NULL 2023-12-26 18:27:23 2023-12-26 18:42:55 NULL utf-8 NULL NULL
============================================
q1 4823 4644 4756 4644
q2 q3 3845 4305 3879 3879
q4 918 1226 834 834
q5 4041 4407 4355 4355
q6 177 180 143 143
q7 1752 1663 1537 1537
q8 2472 2717 2623 2623
q9 7645 7536 7410 7410
q10 3789 3979 3628 3628
q11 506 429 423 423
q12 504 596 465 465
q13 2777 3273 2686 2686
q14 289 309 296 296
q15 q16 732 785 734 734
q17 1223 1388 1370 1370
q18 7279 6981 6711 6711
q19 965 975 973 973
q20 2067 2149 1971 1971
q21 3952 3552 3341 3341
q22 443 445 384 384
Total cold run time: 50199 ms
Total hot run time: 48407 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] [fix](inverted index) Fix BUILD INDEX producing inconsistent query results with multiple analyzers [doris]
Posted by "Thearas (via GitHub)" <gi...@apache.org>.
Thearas commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4103710181
Thank you for your contribution to Apache Doris.
Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/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?
--
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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4107701470
# BE Regression && UT Coverage Report
Increment line coverage `100% (0/0)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/61596_4e00240612a29fceacd3d7c6f3928c5ba87a6616_merge/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/61596_4e00240612a29fceacd3d7c6f3928c5ba87a6616_merge/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 73.26% (26961/36800) |
| Line Coverage | 56.66% (288357/508924) |
| Region Coverage | 53.99% (240294/445039) |
| Branch Coverage | 55.73% (104044/186700) |
--
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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "airborne12 (via GitHub)" <gi...@apache.org>.
airborne12 commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4105187674
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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4105927557
# BE Regression && UT Coverage Report
Increment line coverage `100% (0/0)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/61596_4bfa7c5cffc38c4f23f5b8ed3dce047a54e14fda_merge/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/61596_4bfa7c5cffc38c4f23f5b8ed3dce047a54e14fda_merge/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 73.42% (27020/36800) |
| Line Coverage | 56.84% (289288/508924) |
| Region Coverage | 54.26% (241463/445039) |
| Branch Coverage | 55.94% (104439/186700) |
--
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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "airborne12 (via GitHub)" <gi...@apache.org>.
airborne12 merged PR #61596:
URL: https://github.com/apache/doris/pull/61596
--
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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4106249881
<details>
<summary>TPC-DS: <b>Total hot run time: 169121 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 4e00240612a29fceacd3d7c6f3928c5ba87a6616, data reload: false
query5 4334 632 525 525
query6 352 238 240 238
query7 4222 459 267 267
query8 358 243 229 229
query9 8730 2744 2713 2713
query10 529 418 346 346
query11 7043 5102 4860 4860
query12 190 137 125 125
query13 1271 468 356 356
query14 5784 3725 3473 3473
query14_1 2919 2868 2880 2868
query15 214 201 181 181
query16 1009 485 469 469
query17 890 740 634 634
query18 2454 455 355 355
query19 227 218 195 195
query20 139 128 129 128
query21 214 139 113 113
query22 13309 14058 14286 14058
query23 16355 15956 15888 15888
query23_1 15956 15867 15770 15770
query24 7342 1644 1239 1239
query24_1 1246 1205 1276 1205
query25 594 466 418 418
query26 1233 275 151 151
query27 2759 494 292 292
query28 4503 1825 1821 1821
query29 853 570 472 472
query30 300 230 189 189
query31 997 968 875 875
query32 82 74 73 73
query33 512 339 289 289
query34 893 877 523 523
query35 653 690 596 596
query36 1094 1139 938 938
query37 133 93 82 82
query38 2926 2940 2924 2924
query39 888 836 824 824
query39_1 804 808 805 805
query40 231 151 133 133
query41 76 60 60 60
query42 259 255 252 252
query43 239 252 217 217
query44
query45 203 196 181 181
query46 873 986 620 620
query47 2560 2140 2042 2042
query48 318 315 229 229
query49 633 481 404 404
query50 675 273 218 218
query51 4032 4031 4029 4029
query52 264 268 259 259
query53 300 341 292 292
query54 310 281 283 281
query55 94 88 81 81
query56 342 339 308 308
query57 1929 1648 1747 1648
query58 285 279 278 278
query59 2770 2938 2732 2732
query60 360 344 330 330
query61 159 151 142 142
query62 638 605 542 542
query63 314 282 282 282
query64 5085 1290 993 993
query65
query66 1454 453 349 349
query67 24323 24301 24221 24221
query68
query69 398 314 294 294
query70 935 963 885 885
query71 351 322 307 307
query72 2782 2685 2511 2511
query73 541 553 325 325
query74 9632 9603 9429 9429
query75 2867 2778 2470 2470
query76 2293 1026 672 672
query77 372 370 313 313
query78 11013 11127 10496 10496
query79 1124 772 576 576
query80 946 661 571 571
query81 534 262 236 236
query82 1314 190 122 122
query83 343 258 239 239
query84 292 119 94 94
query85 875 486 444 444
query86 398 331 300 300
query87 3141 3102 3041 3041
query88 3551 2673 2659 2659
query89 430 369 346 346
query90 1906 186 180 180
query91 174 163 138 138
query92 79 74 71 71
query93 895 836 513 513
query94 508 321 309 309
query95 606 398 323 323
query96 657 528 233 233
query97 2477 2492 2395 2395
query98 238 229 234 229
query99 1032 993 925 925
Total cold run time: 249906 ms
Total hot run time: 169121 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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4106482246
# BE Regression && UT Coverage Report
Increment line coverage `100% (0/0)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/61596_4e00240612a29fceacd3d7c6f3928c5ba87a6616_merge/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/61596_4e00240612a29fceacd3d7c6f3928c5ba87a6616_merge/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 73.26% (26961/36800) |
| Line Coverage | 56.66% (288357/508924) |
| Region Coverage | 53.99% (240294/445039) |
| Branch Coverage | 55.73% (104044/186700) |
--
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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4105479085
<details>
<summary>TPC-DS: <b>Total hot run time: 169627 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 4bfa7c5cffc38c4f23f5b8ed3dce047a54e14fda, data reload: false
query5 4324 656 502 502
query6 339 248 226 226
query7 4220 481 282 282
query8 347 271 235 235
query9 8699 2734 2708 2708
query10 529 392 338 338
query11 6955 5110 4881 4881
query12 185 127 126 126
query13 1278 472 364 364
query14 5769 3715 3544 3544
query14_1 2868 2825 2794 2794
query15 220 195 180 180
query16 974 483 457 457
query17 934 738 641 641
query18 2454 458 363 363
query19 217 224 196 196
query20 134 129 127 127
query21 214 138 111 111
query22 13286 14071 14382 14071
query23 16114 15951 15785 15785
query23_1 16207 15937 15817 15817
query24 7521 1700 1229 1229
query24_1 1243 1239 1242 1239
query25 577 523 413 413
query26 1228 272 147 147
query27 2774 491 305 305
query28 4517 1848 1849 1848
query29 863 564 465 465
query30 300 226 194 194
query31 986 939 875 875
query32 85 69 73 69
query33 512 346 282 282
query34 936 882 531 531
query35 641 684 620 620
query36 1105 1092 949 949
query37 138 97 86 86
query38 2923 2931 2940 2931
query39 854 829 818 818
query39_1 791 809 796 796
query40 234 151 138 138
query41 63 60 59 59
query42 264 259 257 257
query43 248 254 231 231
query44
query45 201 187 184 184
query46 881 986 617 617
query47 2121 2134 2077 2077
query48 369 347 238 238
query49 626 458 390 390
query50 686 292 222 222
query51 4125 4071 4027 4027
query52 267 270 261 261
query53 291 358 298 298
query54 315 292 280 280
query55 95 88 85 85
query56 333 329 328 328
query57 1948 1915 1723 1723
query58 286 278 277 277
query59 2786 2936 2764 2764
query60 349 341 336 336
query61 157 156 156 156
query62 624 596 545 545
query63 314 277 284 277
query64 5107 1272 982 982
query65
query66 1479 449 365 365
query67 24294 24330 24204 24204
query68
query69 415 304 296 296
query70 998 976 983 976
query71 359 323 314 314
query72 2897 2718 2655 2655
query73 556 559 332 332
query74 9643 9618 9423 9423
query75 2849 2771 2482 2482
query76 2290 1043 692 692
query77 373 397 340 340
query78 10957 11050 10490 10490
query79 2616 780 572 572
query80 1804 639 572 572
query81 555 261 228 228
query82 1002 153 119 119
query83 340 266 245 245
query84 300 118 106 106
query85 916 498 445 445
query86 407 335 282 282
query87 3118 3183 3033 3033
query88 3584 2678 2658 2658
query89 439 376 357 357
query90 2066 181 187 181
query91 174 160 145 145
query92 82 77 74 74
query93 1150 867 497 497
query94 659 317 266 266
query95 607 414 320 320
query96 650 541 226 226
query97 2424 2508 2394 2394
query98 238 220 215 215
query99 1001 989 915 915
Total cold run time: 252721 ms
Total hot run time: 169627 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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "airborne12 (via GitHub)" <gi...@apache.org>.
airborne12 commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4106183106
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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4114794670
PR approved by at least one committer and no changes requested.
--
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] [fix](inverted index) Fix BUILD INDEX producing inconsistent query results with multiple analyzers [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #61596:
URL: https://github.com/apache/doris/pull/61596#discussion_r2969824019
##########
be/src/storage/tablet/tablet_schema.cpp:
##########
@@ -1105,6 +1105,48 @@ void TabletSchema::remove_index(int64_t index_id) {
}
}
+void TabletSchema::reorder_indexes_by(const TabletSchemaSPtr& reference_schema) {
+ // Build a position map from the reference schema's index ordering.
+ // Indexes present in the reference schema are sorted to match its order;
+ // indexes not in the reference schema are placed at the end, preserving
+ // their relative order.
+ std::unordered_map<int64_t, size_t> ref_order;
+ const auto& ref_indexes = reference_schema->inverted_indexes();
+ for (size_t i = 0; i < ref_indexes.size(); ++i) {
Review Comment:
**Suggestion (non-blocking):** `inverted_indexes()` only returns indexes with `IndexType::INVERTED`, but `_indexes` stores ALL index types (BLOOMFILTER, NGRAM_BF, ANN, BITMAP, INVERTED). The `stable_sort` on line 16 sorts the entire `_indexes` vector, so any non-INVERTED indexes (e.g., NGRAM_BF, BLOOMFILTER) will receive `std::numeric_limits<size_t>::max()` and be pushed to the end of `_indexes`.
In the current call site (`index_builder.cpp`), `output_rs_tablet_schema` is `copy_from()` of the input rowset schema, which may contain NGRAM_BF or BLOOMFILTER indexes. After `reorder_indexes_by()`, these would move from their original positions (potentially interleaved with INVERTED indexes) to the end of the vector.
Since the lookup caches are correctly rebuilt, this doesn't cause functional incorrectness. However, it's worth considering using `reference_schema->indexes()` (all indexes) instead of `inverted_indexes()` for the reference ordering, to maintain the relative positions of ALL index types, not just inverted ones. Alternatively, the sort could be scoped to only inverted indexes in the vector.
##########
be/test/storage/tablet/tablet_schema_index_test.cpp:
##########
@@ -237,4 +237,62 @@ TEST_F(TabletSchemaIndexTest, TestIsSameExceptIdWithSameId) {
EXPECT_TRUE(index1.is_same_except_id(&index2));
}
+TEST_F(TabletSchemaIndexTest, TestReorderIndexesBy) {
+ // Simulate the build index scenario: indexes appended in different order
Review Comment:
**Suggestion (non-blocking):** Consider adding a test case with mixed index types (e.g., INVERTED + NGRAM_BF or BLOOMFILTER) to verify that `reorder_indexes_by()` correctly handles schemas containing non-INVERTED indexes. Currently both test cases use only `IndexType::INVERTED`, but in production, `output_rs_tablet_schema` from `copy_from()` can contain BLOOMFILTER and NGRAM_BF indexes as well.
--
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] [fix](inverted index) Fix BUILD INDEX producing inconsistent query results with multiple analyzers [doris]
Posted by "airborne12 (via GitHub)" <gi...@apache.org>.
airborne12 commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4103730421
/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] [fix](inverted index) Make select_best_reader deterministic for multi-index columns [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #61596:
URL: https://github.com/apache/doris/pull/61596#issuecomment-4108970158
# BE Regression && UT Coverage Report
Increment line coverage `100% (0/0)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/61596_4e00240612a29fceacd3d7c6f3928c5ba87a6616_merge/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/61596_4e00240612a29fceacd3d7c6f3928c5ba87a6616_merge/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 73.33% (26985/36800) |
| Line Coverage | 56.73% (288699/508924) |
| Region Coverage | 54.09% (240700/445039) |
| Branch Coverage | 55.81% (104188/186700) |
--
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