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

Method CharLength

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

Source from the content-addressed store, hash-verified

270}
271
272IntVal StringFunctions::CharLength(FunctionContext* context, const StringVal& str) {
273 if (str.is_null) return IntVal::null();
274 const FunctionContext::TypeDesc* t = context->GetArgType(0);
275 DCHECK_EQ(t->type, FunctionContext::TYPE_FIXED_BUFFER);
276 return StringValue::UnpaddedCharLength(reinterpret_cast<char*>(str.ptr), t->len);
277}
278
279static int CountUtf8Chars(uint8_t* ptr, int len) {
280 if (ptr == nullptr) return 0;

Callers

nothing calls this directly

Calls 1

GetArgTypeMethod · 0.80

Tested by

no test coverage detected