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

Method EvalRow

be/src/exec/hash-table.cc:259–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257}
258
259bool HashTableCtx::EvalRow(const TupleRow* row,
260 const vector<ScalarExprEvaluator*>& evals,
261 uint8_t* expr_values, uint8_t* expr_values_null) noexcept {
262 bool has_null = false;
263 for (int i = 0; i < evals.size(); ++i) {
264 void* loc = expr_values_cache_.ExprValuePtr(expr_values, i);
265 const void* val = evals[i]->GetValue(row);
266 if (val == NULL) {
267 // If the table doesn't store nulls, no reason to keep evaluating
268 if (!stores_nulls_) return true;
269 expr_values_null[i] = true;
270 val = reinterpret_cast<void*>(&NULL_VALUE);
271 has_null = true;
272 } else {
273 expr_values_null[i] = false;
274 }
275 const ColumnType& expr_type = build_exprs_[i]->type();
276 DCHECK_LE(expr_type.GetSlotSize(), sizeof(NULL_VALUE));
277 val = RawValue::CanonicalValue(val, expr_type);
278 RawValue::WriteNonNullPrimitive(val, loc, expr_type, NULL);
279 }
280 return has_null;
281}
282
283uint32_t HashTableCtx::HashVariableLenRow(const uint8_t* expr_values,
284 const uint8_t* expr_values_null) const {

Callers

nothing calls this directly

Calls 5

ExprValuePtrMethod · 0.80
GetSlotSizeMethod · 0.80
sizeMethod · 0.45
GetValueMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected