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

Method getNodeInsertExecutor

src/processor/map/map_insert.cpp:32–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32NodeInsertExecutor PlanMapper::getNodeInsertExecutor(const LogicalInsertInfo* boundInfo,
33 const Schema& inSchema, const Schema& outSchema) const {
34 auto& node = boundInfo->pattern->constCast<NodeExpression>();
35 auto nodeIDPos = getDataPos(*node.getInternalID(), outSchema);
36 auto columnsPos = populateReturnColumnsPos(*boundInfo, outSchema);
37 auto info = NodeInsertInfo(nodeIDPos, columnsPos, boundInfo->conflictAction);
38 auto storageManager = StorageManager::Get(*clientContext);
39 DASSERT(node.getNumEntries() == 1);
40 ;
41 auto table = storageManager->getTable(node.getEntry(0)->getTableID())->ptrCast<NodeTable>();
42 evaluator_vector_t evaluators;
43 auto exprMapper = ExpressionMapper(&inSchema);
44 for (auto& expr : boundInfo->columnDataExprs) {
45 evaluators.push_back(exprMapper.getEvaluator(expr));
46 }
47 auto tableInfo = NodeTableInsertInfo(table, std::move(evaluators));
48 return NodeInsertExecutor(std::move(info), std::move(tableInfo));
49}
50
51RelInsertExecutor PlanMapper::getRelInsertExecutor(const LogicalInsertInfo* boundInfo,
52 const Schema& inSchema, const Schema& outSchema) const {

Callers

nothing calls this directly

Calls 10

populateReturnColumnsPosFunction · 0.85
NodeInsertInfoClass · 0.85
ExpressionMapperClass · 0.85
NodeTableInsertInfoClass · 0.85
getEvaluatorMethod · 0.80
NodeInsertExecutorClass · 0.50
getNumEntriesMethod · 0.45
getTableMethod · 0.45
getEntryMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected