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

Method GetStringValInterpreted

be/src/exprs/slot-ref.cc:493–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491SLOT_REF_GET_FUNCTION(TYPE_DOUBLE, DoubleVal, double);
492
493StringVal SlotRef::GetStringValInterpreted(
494 ScalarExprEvaluator* eval, const TupleRow* row) const {
495 DCHECK(type_.IsStringType() || type_.type == TYPE_FIXED_UDA_INTERMEDIATE);
496 Tuple* t = row->GetTuple(tuple_idx_);
497 if (t == NULL || t->IsNull(null_indicator_offset_)) return StringVal::null();
498 StringVal result;
499 if (type_.type == TYPE_CHAR || type_.type == TYPE_FIXED_UDA_INTERMEDIATE) {
500 result.ptr = reinterpret_cast<uint8_t*>(t->GetSlot(slot_offset_));
501 result.len = type_.len;
502 } else {
503 StringValue* sv = reinterpret_cast<StringValue*>(t->GetSlot(slot_offset_));
504 sv->ToStringVal(&result);
505 }
506 return result;
507}
508
509TimestampVal SlotRef::GetTimestampValInterpreted(
510 ScalarExprEvaluator* eval, const TupleRow* row) const {

Callers

nothing calls this directly

Calls 5

IsStringTypeMethod · 0.80
GetTupleMethod · 0.45
IsNullMethod · 0.45
GetSlotMethod · 0.45
ToStringValMethod · 0.45

Tested by

no test coverage detected