MCPcopy Create free account
hub / github.com/bytedance/bolt / evalSpecialFormSimplified

Method evalSpecialFormSimplified

bolt/expression/TryExpr.cpp:54–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void 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
73namespace {
74

Callers

nothing calls this directly

Calls 3

mutableThrowOnErrorMethod · 0.80
errorsPtrMethod · 0.80
evalSimplifiedMethod · 0.80

Tested by

no test coverage detected