16 #ifndef IMPALA_RUNTIME_STRING_SEARCH_H
17 #define IMPALA_RUNTIME_STRING_SEARCH_H
21 #include <boost/cstdint.hpp>
99 for (
int i = 0; i < mlast; ++i) {
102 skip_ = mlast - i - 1;
120 const char* s = str->
ptr;
125 const char* result =
reinterpret_cast<const char*
>(memchr(s, p[0], n));
126 if (result != NULL)
return result - s;
135 for (
int i = 0; i <= w; i++) {
137 if (s[i+m-1] == p[m-1]) {
139 for (j = 0; j < mlast; j++)
140 if (s[i+j] != p[j])
break;
const StringValue * pattern_
int Search(const StringValue *str) const
StringSearch(const StringValue *pattern)
Initialize/Precompute a StringSearch object from the pattern.
static const int BLOOM_WIDTH
bool BloomQuery(char c) const