| 52 | } |
| 53 | |
| 54 | void TryExpr::evalSpecialFormSimplified( |
| 55 | const SelectivityVector& rows, |
| 56 | EvalCtx& context, |
| 57 | VectorPtr& result) { |
| 58 | ScopedVarSetter throwOnError(context.mutableThrowOnError(), false); |
| 59 | // It's possible with nested TRY expressions that some rows already threw |
| 60 | // exceptions in earlier expressions that haven't been handled yet. To avoid |
| 61 | // incorrectly handling them here, store those errors and temporarily reset |
| 62 | // the errors in context to nullptr, so we only handle errors coming from |
| 63 | // expressions that are children of this TRY expression. |
| 64 | // This also prevents this TRY expression from leaking exceptions to the |
| 65 | // parent TRY expression, so the parent won't incorrectly null out rows that |
| 66 | // threw exceptions which this expression already handled. |
| 67 | ScopedVarSetter<ErrorVectorPtr> errorsSetter(context.errorsPtr(), nullptr); |
| 68 | inputs_[0]->evalSimplified(rows, context, result); |
| 69 | |
| 70 | nullOutErrors(rows, context, result); |
| 71 | } |
| 72 | |
| 73 | namespace { |
| 74 |
nothing calls this directly
no test coverage detected