Repository navigation
Commit fc1b822
authored
[opt](be) Cache segment row bitmap cardinality (#66742)
`SegmentIterator` recalculates the row bitmap cardinality for every
output batch. For large segments, this repeatedly traverses all Roaring
bitmap containers and adds significant scan overhead. This change caches
the cardinality after all bitmap filters are applied during lazy
initialization and reuses it for column reservation and batch reads.
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] 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 <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->1 parent 978d5c8 commit fc1b822
2 files changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
587 | 591 | | |
588 | 592 | | |
589 | 593 | | |
| |||
594 | 598 | | |
595 | 599 | | |
596 | 600 | | |
597 | | - | |
598 | | - | |
| 601 | + | |
599 | 602 | | |
600 | 603 | | |
601 | 604 | | |
| |||
619 | 622 | | |
620 | 623 | | |
621 | 624 | | |
622 | | - | |
| 625 | + | |
623 | 626 | | |
624 | 627 | | |
625 | 628 | | |
| |||
3041 | 3044 | | |
3042 | 3045 | | |
3043 | 3046 | | |
3044 | | - | |
| 3047 | + | |
3045 | 3048 | | |
3046 | 3049 | | |
3047 | 3050 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| 371 | + | |
| 372 | + | |
371 | 373 | | |
372 | 374 | | |
373 | 375 | | |
| |||
0 commit comments