| 150 | } |
| 151 | |
| 152 | bool UncommittedIndexInserter::processScanOutput(main::ClientContext* context, |
| 153 | NodeGroupScanResult scanResult, const std::vector<ValueVector*>& scannedVectors) { |
| 154 | if (scanResult == NODE_GROUP_SCAN_EMPTY_RESULT) { |
| 155 | return false; |
| 156 | } |
| 157 | for (auto i = 0u; i < scanResult.numRows; i++) { |
| 158 | nodeIDVector.setValue(i, nodeID_t{startNodeOffset + i, table->getTableID()}); |
| 159 | } |
| 160 | if (!insertState) { |
| 161 | insertState = index->initInsertState(context, isVisible); |
| 162 | } |
| 163 | index->commitInsert(transaction::Transaction::Get(*context), nodeIDVector, {scannedVectors}, |
| 164 | *insertState); |
| 165 | startNodeOffset += scanResult.numRows; |
| 166 | return true; |
| 167 | } |
| 168 | |
| 169 | std::unique_ptr<NodeTableScanState> CommittedIndexInserter::initScanState( |
| 170 | const Transaction* transaction, DataChunk& dataChunk) { |
no test coverage detected