| 30 | } |
| 31 | |
| 32 | NodeInsertExecutor 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 | |
| 51 | RelInsertExecutor PlanMapper::getRelInsertExecutor(const LogicalInsertInfo* boundInfo, |
| 52 | const Schema& inSchema, const Schema& outSchema) const { |
nothing calls this directly
no test coverage detected