| 80 | } |
| 81 | |
| 82 | void finalizeErrors( |
| 83 | const SelectivityVector& rows, |
| 84 | const SelectivityVector& activeRows, |
| 85 | bool throwOnError, |
| 86 | EvalCtx& context) { |
| 87 | auto errors = context.errors(); |
| 88 | if (!errors) { |
| 89 | return; |
| 90 | } |
| 91 | // Pre-existing errors outside of initial active rows are preserved. Errors in |
| 92 | // the initial active rows but not in the final active rows are cleared. |
| 93 | auto size = |
| 94 | std::min(std::min(rows.size(), activeRows.size()), errors->size()); |
| 95 | for (auto i = 0; i < size; ++i) { |
| 96 | if (errors->isNullAt(i)) { |
| 97 | continue; |
| 98 | } |
| 99 | if (rows.isValid(i) && !activeRows.isValid(i)) { |
| 100 | errors->setNull(i, true); |
| 101 | } |
| 102 | if (throwOnError && !errors->isNullAt(i)) { |
| 103 | auto exceptionPtr = |
| 104 | std::static_pointer_cast<std::exception_ptr>(errors->valueAt(i)); |
| 105 | std::rethrow_exception(*exceptionPtr); |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | } // namespace |
| 110 | |
| 111 | void ConjunctExpr::evalSpecialForm( |