| 257 | } |
| 258 | |
| 259 | bool 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 | |
| 283 | uint32_t HashTableCtx::HashVariableLenRow(const uint8_t* expr_values, |
| 284 | const uint8_t* expr_values_null) const { |
nothing calls this directly
no test coverage detected