MCPcopy Create free account
hub / github.com/apache/impala / Contains

Method Contains

be/src/exprs/string-functions-ir.cc:735–744  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

733}
734
735bool StringFunctions::TrimContext::Contains(const uint8_t* utf8_char, int len) const {
736 auto eq = [&](const uint8_t* c){ return memcmp(c, utf8_char, len) == 0; };
737 switch (len) {
738 case 1: return single_byte_chars_.test(*utf8_char);
739 case 2: return any_of(double_byte_chars_.begin(), double_byte_chars_.end(), eq);
740 case 3: return any_of(triple_byte_chars_.begin(), triple_byte_chars_.end(), eq);
741 case 4: return any_of(quadruple_byte_chars_.begin(), quadruple_byte_chars_.end(), eq);
742 default: DCHECK(false); return false;
743 }
744}
745
746void StringFunctions::TrimPrepare(FunctionContext* context,
747 FunctionContext::FunctionStateScope scope) {

Callers 3

DoTrimStringMethod · 0.45
DoUtf8TrimStringMethod · 0.45
WaitOnQueuedMethod · 0.45

Calls 3

testMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected