MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / initLocalStateInternal

Method initLocalStateInternal

src/processor/operator/index_lookup.cpp:282–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282void IndexLookup::initLocalStateInternal(ResultSet* resultSet, ExecutionContext* context) {
283 auto errorHandler = std::make_unique<BatchInsertErrorHandler>(context,
284 WarningContext::Get(*context->clientContext)->getIgnoreErrorsOption());
285 localState = std::make_unique<IndexLookupLocalState>(std::move(errorHandler));
286 for (auto& pos : warningDataVectorPos) {
287 localState->warningDataVectors.push_back(resultSet->getValueVector(pos).get());
288 }
289 for (auto& info : infos) {
290 info.keyEvaluator->init(*resultSet, context->clientContext);
291 if (info.noIndexLookupCache) {
292 info.noIndexLookupCache->buildIfNeeded(info.nodeTable,
293 transaction::Transaction::Get(*context->clientContext), context->clientContext);
294 }
295 }
296}
297
298void IndexLookup::lookup(transaction::Transaction* transaction, const IndexLookupInfo& info) {
299 auto keyVector = info.keyEvaluator->resultVector.get();

Callers

nothing calls this directly

Calls 6

buildIfNeededMethod · 0.80
getIgnoreErrorsOptionMethod · 0.45
push_backMethod · 0.45
getMethod · 0.45
getValueVectorMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected