Commit 291a90b
committed
[Bug](aggregate) fix bitmap_union return error result in query sql (apache#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
}
```1 parent 8b59672 commit 291a90b
1 file changed
+4
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
0 commit comments