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

Method addErrors

bolt/expression/EvalCtx.cpp:157–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157void EvalCtx::addErrors(
158 const SelectivityVector& rows,
159 const ErrorVectorPtr& fromErrors,
160 ErrorVectorPtr& toErrors) const {
161 if (!fromErrors) {
162 return;
163 }
164
165 ensureErrorsVectorSize(toErrors, fromErrors->size());
166 rows.testSelected([&](auto row) {
167 if (!fromErrors->isIndexInRange(row)) {
168 return false;
169 }
170 if (!fromErrors->isNullAt(row) && toErrors->isNullAt(row)) {
171 toErrors->set(
172 row,
173 std::static_pointer_cast<std::exception_ptr>(
174 fromErrors->valueAt(row)));
175 }
176 return true;
177 });
178}
179
180void EvalCtx::restore(ContextSaver& saver) {
181 BOLT_TEST_ADJUST("bytedance::bolt::exec::EvalCtx::restore", this);

Callers 4

combineErrorsMethod · 0.80
transformErrorVectorMethod · 0.80
TEST_FFunction · 0.80

Calls 5

testSelectedMethod · 0.80
sizeMethod · 0.45
isNullAtMethod · 0.45
setMethod · 0.45
valueAtMethod · 0.45

Tested by 1

TEST_FFunction · 0.64