You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/12/24 16:02:42 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #7448: [BloomFilter](bug) Fix error when char(0)

morningman commented on a change in pull request #7448:
URL: https://github.com/apache/incubator-doris/pull/7448#discussion_r775047347



##########
File path: be/src/exprs/bloomfilter_predicate.h
##########
@@ -206,11 +206,12 @@ struct StringFindOp {
 template <class BloomFilterAdaptor>
 struct FixedStringFindOp : public StringFindOp<BloomFilterAdaptor> {
     ALWAYS_INLINE bool find_olap_engine(const BloomFilterAdaptor& bloom_filter,
-                                        const void* data) const {
-        const auto* value = reinterpret_cast<const StringValue*>(data);
-        auto end_ptr = value->ptr + value->len - 1;
-        while (end_ptr > value->ptr && *end_ptr == '\0') --end_ptr;
-        return bloom_filter.test_bytes(value->ptr, end_ptr - value->ptr + 1);

Review comment:
       Why the origin implement can' t handle char(0)?




-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org