You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2023/06/15 06:05:32 UTC
[doris] branch master updated: [fix](bitmap) fix bug: incorrect orthogonal bitmap result in some cases (#20819) (#20822)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 2151f5d04d [fix](bitmap) fix bug: incorrect orthogonal bitmap result in some cases (#20819) (#20822)
2151f5d04d is described below
commit 2151f5d04dfe8755d0be2e3c373f4fc4a97f8ab0
Author: fornaix <fo...@gmail.com>
AuthorDate: Thu Jun 15 14:05:24 2023 +0800
[fix](bitmap) fix bug: incorrect orthogonal bitmap result in some cases (#20819) (#20822)
Issue Number: close #20819
If there is only one aggregation (update finalize) phase, result field will not be updated.
This pr is aim to resolve it.
---
.../aggregate_functions/aggregate_function_orthogonal_bitmap.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.h b/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.h
index 0177f1c415..c632169c55 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.h
@@ -252,7 +252,10 @@ public:
void get(IColumn& to) const {
auto& column = assert_cast<ColumnBitmap&>(to);
- column.get_data().emplace_back(result);
+ column.get_data().emplace_back(!result.empty()
+ ? result
+ : const_cast<AggOrthBitMapExprCal*>(this)
+ ->bitmap_expr_cal.bitmap_calculate());
}
private:
@@ -286,7 +289,9 @@ public:
void get(IColumn& to) const {
auto& column = assert_cast<ColumnVector<Int64>&>(to);
- column.get_data().emplace_back(result);
+ column.get_data().emplace_back(result ? result
+ : const_cast<AggOrthBitMapExprCalCount*>(this)
+ ->bitmap_expr_cal.bitmap_calculate_count());
}
private:
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org