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

Function finalizeErrors

bolt/expression/ConjunctExpr.cpp:82–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void 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
111void ConjunctExpr::evalSpecialForm(

Callers 1

evalSpecialFormMethod · 0.85

Calls 7

isValidMethod · 0.80
minFunction · 0.50
errorsMethod · 0.45
sizeMethod · 0.45
isNullAtMethod · 0.45
setNullMethod · 0.45
valueAtMethod · 0.45

Tested by

no test coverage detected