github-actions[bot] commented on code in PR #28094:
URL: https://github.com/apache/doris/pull/28094#discussion_r1418096282


##########
be/src/exprs/bloom_filter_func.h:
##########
@@ -394,33 +388,16 @@ struct StringFindOp : public BaseOp {
             }
         }
     }
-
-    static void insert(BloomFilterAdaptor& bloom_filter, const void* data) {
-        const auto* value = reinterpret_cast<const StringRef*>(data);
-        if (value) {
-            bloom_filter.add_bytes(value->data, value->size);
-        }
-    }
-
-    bool find_olap_engine(const BloomFilterAdaptor& bloom_filter, const void* 
data) const override {
-        const auto* value = reinterpret_cast<const StringRef*>(data);
-        return bloom_filter.test(*value);
-    }
 };
 
 // We do not need to judge whether data is empty, because null will not appear
 // when filer used by the storage engine
 struct FixedStringFindOp : public StringFindOp {
-    bool find_olap_engine(const BloomFilterAdaptor& bloom_filter,
-                          const void* input_data) const override {
-        const auto* value = reinterpret_cast<const StringRef*>(input_data);
-        int64_t size = value->size;
-        const char* data = value->data;
-        // CHAR type may pad the tail with \0, need to trim
-        while (size > 0 && data[size - 1] == '\0') {
-            size--;
-        }
-        return bloom_filter.test(StringRef(value->data, size));
+    uint16_t find_batch_olap_engine(const BloomFilterAdaptor& bloom_filter, 
const char* data,

Review Comment:
   warning: method 'find_batch_olap_engine' can be made static 
[readability-convert-member-functions-to-static]
   
   ```suggestion
       static uint16_t find_batch_olap_engine(const BloomFilterAdaptor& 
bloom_filter, const char* data,
   ```
   



##########
be/src/exprs/bloom_filter_func.h:
##########
@@ -394,33 +388,16 @@
             }
         }
     }
-
-    static void insert(BloomFilterAdaptor& bloom_filter, const void* data) {
-        const auto* value = reinterpret_cast<const StringRef*>(data);
-        if (value) {
-            bloom_filter.add_bytes(value->data, value->size);
-        }
-    }
-
-    bool find_olap_engine(const BloomFilterAdaptor& bloom_filter, const void* 
data) const override {
-        const auto* value = reinterpret_cast<const StringRef*>(data);
-        return bloom_filter.test(*value);
-    }
 };
 
 // We do not need to judge whether data is empty, because null will not appear
 // when filer used by the storage engine
 struct FixedStringFindOp : public StringFindOp {
-    bool find_olap_engine(const BloomFilterAdaptor& bloom_filter,
-                          const void* input_data) const override {
-        const auto* value = reinterpret_cast<const StringRef*>(input_data);
-        int64_t size = value->size;
-        const char* data = value->data;
-        // CHAR type may pad the tail with \0, need to trim
-        while (size > 0 && data[size - 1] == '\0') {
-            size--;
-        }
-        return bloom_filter.test(StringRef(value->data, size));
+    uint16_t find_batch_olap_engine(const BloomFilterAdaptor& bloom_filter, 
const char* data,
+                                    const uint8* nullmap, uint16_t* offsets, 
int number,

Review Comment:
   warning: pointer parameter 'offsets' can be pointer to const 
[readability-non-const-parameter]
   
   ```suggestion
                                       const uint8* nullmap, const uint16_t* 
offsets, int number,
   ```
   



-- 
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