| 478 | } |
| 479 | |
| 480 | // If the initial non null holder couldn't be created, start with the input |
| 481 | // `rows`. |
| 482 | auto* remainingRows = nonNullHolder.get() ? nonNullHolder.get() : &rows; |
| 483 | |
| 484 | if (remainingRows->hasSelections()) { |
| 485 | evalSimplifiedImpl(*remainingRows, context, result); |
| 486 | } |
| 487 | |
| 488 | if (!type()->isFunction()) { |
| 489 | addNulls(rows, remainingRows->asRange().bits(), context, result); |
| 490 | } |
| 491 | } |
| 492 | |
| 493 | void Expr::releaseInputValues(EvalCtx& evalCtx) { |
| 494 | evalCtx.releaseVectors(inputValues_); |
| 495 | inputValues_.clear(); |
| 496 | } |
| 497 | |
| 498 | void Expr::evalSimplifiedImpl( |
| 499 | const SelectivityVector& rows, |
| 500 | EvalCtx& context, |
| 501 | VectorPtr& result) { |
| 502 | // Handle special form expressions. |
| 503 | if (isSpecialForm()) { |
| 504 | evalSpecialFormSimplified(rows, context, result); |
| 505 | return; |
| 506 | } |
| 507 | |
| 508 | MutableRemainingRows remainingRows(rows, context); |
| 509 | const bool defaultNulls = vectorFunction_->isDefaultNullBehavior(); |
| 510 | auto evalArg = [&](int32_t i) { |
| 511 | auto& inputValue = inputValues_[i]; |
no test coverage detected