Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <string-search.h>
Public Member Functions | |
StringSearch () | |
StringSearch (const StringValue *pattern) | |
Initialize/Precompute a StringSearch object from the pattern. More... | |
int | Search (const StringValue *str) const |
Private Member Functions | |
void | BloomAdd (char c) |
bool | BloomQuery (char c) const |
Private Attributes | |
const StringValue * | pattern_ |
int64_t | mask_ |
int64_t | skip_ |
Static Private Attributes | |
static const int | BLOOM_WIDTH = 64 |
TODO: This can be sped up with SIDD_CMP_EQUAL_ORDERED or at the very least rewritten from published algorithms. This is taken from the python search string function doing string search (substring) using an optimized boyer-moore-horspool algorithm.
Definition at line 83 of file string-search.h.
|
inline |
Definition at line 86 of file string-search.h.
|
inline |
Initialize/Precompute a StringSearch object from the pattern.
Definition at line 89 of file string-search.h.
References BloomAdd(), impala::StringValue::len, pattern_, impala::StringValue::ptr, and skip_.
|
inlineprivate |
Definition at line 162 of file string-search.h.
References BLOOM_WIDTH, and mask_.
Referenced by StringSearch().
|
inlineprivate |
Definition at line 166 of file string-search.h.
References BLOOM_WIDTH, and mask_.
Referenced by Search().
|
inline |
Search for this pattern in str. Returns the offset into str if the pattern exists Returns -1 if the pattern is not found
Definition at line 110 of file string-search.h.
References BloomQuery(), impala::StringValue::len, pattern_, impala::StringValue::ptr, and skip_.
Referenced by impala::LikePredicate::ConstantSubstringFn(), impala::BaseSequenceScanner::FindSyncBlock(), impala::StringFunctions::Instr(), impala::StringFunctions::LocatePos(), impala::UrlParser::ParseUrl(), impala::UrlParser::ParseUrlKey(), and TestPython().
|
staticprivate |
Definition at line 160 of file string-search.h.
Referenced by BloomAdd(), and BloomQuery().
|
private |
Definition at line 171 of file string-search.h.
Referenced by BloomAdd(), and BloomQuery().
|
private |
Definition at line 170 of file string-search.h.
Referenced by Search(), and StringSearch().
|
private |
Definition at line 172 of file string-search.h.
Referenced by Search(), and StringSearch().