HappenLee commented on code in PR #66455:
URL: https://github.com/apache/doris/pull/66455#discussion_r3804108223


##########
be/src/exprs/expr_zonemap_filter.cpp:
##########
@@ -550,27 +550,59 @@ ZoneMapFilterResult eval_eq_bloom_filter(const 
BloomFilterEvalContext& ctx,
 
 ZoneMapFilterResult eval_in_bloom_filter(const BloomFilterEvalContext& ctx,
                                          const VExprSPtr& slot_expr, bool 
is_not_in,
-                                         const std::vector<Field>& values) {
+                                         const HybridSetBase& values) {
     if (is_not_in) {
         return ZoneMapFilterResult::kUnsupported;
     }
     auto probe = extract_bloom_filter_probe(slot_expr);
     DORIS_CHECK(probe.has_value());
-    auto slot_filter = ctx.slot(probe->slot_index);
+    const auto* slot_filter = ctx.slot(probe->slot_index);
     if (slot_filter == nullptr || slot_filter->data_type == nullptr ||
         slot_filter->bloom_filter == nullptr) {
         return ZoneMapFilterResult::kUnsupported;
     }
     DORIS_CHECK(data_types_compatible(slot_filter->data_type, 
probe->value_type));
-    if (values.empty()) {
+    if (values.size() == 0) { // NOLINT(readability-container-size-empty)
         return ZoneMapFilterResult::kNoMatch;
     }
-    for (const auto& value : values) {
-        if (!value.is_null() && bloom_filter_may_contain(*slot_filter, value)) 
{
-            return ZoneMapFilterResult::kMayMatch;
-        }
+    const auto value_type = 
remove_nullable(slot_filter->data_type)->get_primitive_type();
+    switch (value_type) {
+    case TYPE_BOOLEAN:
+    case TYPE_INT:
+    case TYPE_BIGINT:
+    case TYPE_CHAR:
+    case TYPE_VARCHAR:
+    case TYPE_STRING:
+        break;

Review Comment:
   这里直接return 不行吗



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to