Skip to content

Conversation

@zhangstar333
Copy link
Contributor

@zhangstar333 zhangstar333 commented Jul 9, 2025

cherry-pick from master #52033

…pache#52033)

Problem Summary:
the bitmap union maybe could call add_batch firstly, and the call add
function,
so if add_batch function not update is_first variable, it's will be loss
data in union.
```
    static void add(BitmapValue& res, const BitmapValue& data, bool& is_first) {
        if (UNLIKELY(is_first)) {
            res = data;
            is_first = false;
        } else {
            res |= data;
        }
    }

    static void add_batch(BitmapValue& res, std::vector<const BitmapValue*>& data, bool& is_first) {
        res.fastunion(data);
        is_first = false;  // before not set this
    }
```
@zhangstar333 zhangstar333 requested a review from morrySnow as a code owner July 9, 2025 07:55
@hello-stephen
Copy link
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?

@zhangstar333
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 0.00% (0/2) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 45.13% (12479/27650)
Line Coverage 35.99% (110626/307410)
Region Coverage 35.17% (57364/163100)
Branch Coverage 32.24% (31096/96446)

@morrySnow morrySnow changed the title [cherry-pick](branch-31) fix bitmap_union return error result in query sql (#52033) branch-3.1: [Bug](aggregate) fix bitmap_union return error result in query sql #52033 Jul 9, 2025
@morrySnow morrySnow merged commit 7db692f into apache:branch-3.1 Jul 10, 2025
22 of 24 checks passed
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.

4 participants