This is an automated email from the ASF dual-hosted git repository.

yangzhg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 45ec084  fix (#6081)
45ec084 is described below

commit 45ec084a6df344b2d5c6ec1aaa67ffeb6c577147
Author: Hao Tan <[email protected]>
AuthorDate: Thu Jun 24 09:44:24 2021 +0800

    fix (#6081)
---
 be/src/olap/rowset/segment_v2/bloom_filter.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/olap/rowset/segment_v2/bloom_filter.cpp 
b/be/src/olap/rowset/segment_v2/bloom_filter.cpp
index 7401895..f12e3e3 100644
--- a/be/src/olap/rowset/segment_v2/bloom_filter.cpp
+++ b/be/src/olap/rowset/segment_v2/bloom_filter.cpp
@@ -46,7 +46,7 @@ uint32_t BloomFilter::_optimal_bit_num(uint64_t n, double 
fpp) {
     }
 
     // Get closest power of 2 if bits is not power of 2.
-    if ((num_bits && (num_bits - 1)) != 0) {
+    if ((num_bits & (num_bits - 1)) != 0) {
         num_bits = 1 << ser::used_bits(num_bits);
     }
     if (num_bits < MINIMUM_BYTES << 3) {

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to