| 92 | } |
| 93 | |
| 94 | nodeID_t NodeInsertExecutor::insert(main::ClientContext* context) { |
| 95 | for (auto& evaluator : tableInfo.columnDataEvaluators) { |
| 96 | evaluator->evaluate(); |
| 97 | } |
| 98 | auto transaction = Transaction::Get(*context); |
| 99 | if (checkConflict(transaction)) { |
| 100 | return info.getNodeID(); |
| 101 | } |
| 102 | storage::NodeTableInsertState insertState{*info.nodeIDVector, *tableInfo.pkVector, |
| 103 | tableInfo.columnDataVectors}; |
| 104 | tableInfo.table->initInsertState(context, insertState); |
| 105 | tableInfo.table->insert(transaction, insertState); |
| 106 | writeColumnVectors(info.columnVectors, tableInfo.columnDataVectors); |
| 107 | return info.getNodeID(); |
| 108 | } |
| 109 | |
| 110 | void NodeInsertExecutor::skipInsert() const { |
| 111 | for (auto& evaluator : tableInfo.columnDataEvaluators) { |
nothing calls this directly
no test coverage detected