MCPcopy Create free account
hub / github.com/apache/impala / StringValue>

Method StringValue>

be/src/runtime/raw-value.inline.h:218–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216
217template<>
218inline uint32_t RawValue::GetHashValueNonNull<impala::StringValue>(
219 const impala::StringValue* v,const ColumnType& type, uint32_t seed) {
220 DCHECK(v != NULL);
221 if (type.type == TYPE_CHAR) {
222 // This is a inlined CHAR(n) slot.
223 // TODO: this is a bit wonky since it's not really a StringValue*. Handle CHAR(n)
224 // in a separate function.
225 return HashUtil::MurmurHash2_64(v, type.len, seed);
226 } else {
227 DCHECK(type.type == TYPE_STRING || type.type == TYPE_VARCHAR);
228 StringValue::SimpleString s = v->ToSimpleString();
229 if (s.len == 0) {
230 return HashUtil::HashCombine32(HASH_VAL_EMPTY, seed);
231 }
232 return HashUtil::MurmurHash2_64(s.ptr, s.len, seed);
233 }
234}
235
236template<>
237inline uint32_t RawValue::GetHashValueNonNull<TimestampValue>(

Callers

nothing calls this directly

Calls 1

ToSimpleStringMethod · 0.45

Tested by

no test coverage detected