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

panxiaolei pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 32e8d184fc2 branch-3.0: [Chore](runtime-filter) change some rf dcheck 
to exception #44354 (#44371)
32e8d184fc2 is described below

commit 32e8d184fc2212abcbd52038f3cc0cfe6d290998
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Nov 27 20:39:33 2024 +0800

    branch-3.0: [Chore](runtime-filter) change some rf dcheck to exception 
#44354 (#44371)
    
    Cherry-picked from #44354
    
    Co-authored-by: Pxl <[email protected]>
---
 be/src/exprs/runtime_filter.cpp | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/be/src/exprs/runtime_filter.cpp b/be/src/exprs/runtime_filter.cpp
index b890673460f..b8032d7f0f1 100644
--- a/be/src/exprs/runtime_filter.cpp
+++ b/be/src/exprs/runtime_filter.cpp
@@ -362,8 +362,11 @@ public:
     }
 
     Status init_bloom_filter(const size_t build_bf_cardinality) {
-        DCHECK(_filter_type == RuntimeFilterType::BLOOM_FILTER ||
-               _filter_type == RuntimeFilterType::IN_OR_BLOOM_FILTER);
+        if (_filter_type != RuntimeFilterType::BLOOM_FILTER &&
+            _filter_type != RuntimeFilterType::IN_OR_BLOOM_FILTER) {
+            throw Exception(ErrorCode::INTERNAL_ERROR,
+                            "init_bloom_filter meet invalid input type {}", 
int(_filter_type));
+        }
         return 
_context->bloom_filter_func->init_with_cardinality(build_bf_cardinality);
     }
 
@@ -391,7 +394,9 @@ public:
     BloomFilterFuncBase* get_bloomfilter() const { return 
_context->bloom_filter_func.get(); }
 
     void insert_fixed_len(const vectorized::ColumnPtr& column, size_t start) {
-        DCHECK(!is_ignored());
+        if (is_ignored()) {
+            throw Exception(ErrorCode::INTERNAL_ERROR, "insert_fixed_len meet 
ignored rf");
+        }
         switch (_filter_type) {
         case RuntimeFilterType::IN_FILTER: {
             _context->hybrid_set->insert_fixed_len(column, start);
@@ -918,7 +923,10 @@ public:
             return _context->bloom_filter_func->contain_null();
         }
         if (_context->hybrid_set) {
-            DCHECK(get_real_type() == RuntimeFilterType::IN_FILTER);
+            if (get_real_type() != RuntimeFilterType::IN_FILTER) {
+                throw Exception(ErrorCode::INTERNAL_ERROR, "rf has hybrid_set 
but real type is {}",
+                                int(get_real_type()));
+            }
             return _context->hybrid_set->contain_null();
         }
         if (_context->minmax_func) {


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

Reply via email to