| 44 | } |
| 45 | |
| 46 | std::unique_ptr<NodeSetExecutor> PlanMapper::getNodeSetExecutor( |
| 47 | const BoundSetPropertyInfo& boundInfo, const Schema& schema) const { |
| 48 | auto& node = boundInfo.pattern->constCast<NodeExpression>(); |
| 49 | auto nodeIDPos = getDataPos(*node.getInternalID(), schema); |
| 50 | auto& property = boundInfo.column->constCast<PropertyExpression>(); |
| 51 | auto columnVectorPos = DataPos::getInvalidPos(); |
| 52 | if (schema.isExpressionInScope(property)) { |
| 53 | columnVectorPos = getDataPos(property, schema); |
| 54 | } |
| 55 | auto exprMapper = ExpressionMapper(&schema); |
| 56 | auto evaluator = exprMapper.getEvaluator(boundInfo.columnData); |
| 57 | auto setInfo = NodeSetInfo(nodeIDPos, columnVectorPos, std::move(evaluator)); |
| 58 | if (node.isMultiLabeled()) { |
| 59 | table_id_map_t<NodeTableSetInfo> tableInfos; |
| 60 | for (auto entry : node.getEntries()) { |
| 61 | auto tableID = entry->getTableID(); |
| 62 | auto tableInfo = |
| 63 | getNodeTableSetInfo(*entry, property, StorageManager::Get(*clientContext)); |
| 64 | if (tableInfo.columnID == INVALID_COLUMN_ID) { |
| 65 | continue; |
| 66 | } |
| 67 | tableInfos.insert({tableID, std::move(tableInfo)}); |
| 68 | } |
| 69 | return std::make_unique<MultiLabelNodeSetExecutor>(std::move(setInfo), |
| 70 | std::move(tableInfos)); |
| 71 | } |
| 72 | DASSERT(node.getNumEntries() == 1); |
| 73 | auto tableInfo = |
| 74 | getNodeTableSetInfo(*node.getEntry(0), property, StorageManager::Get(*clientContext)); |
| 75 | return std::make_unique<SingleLabelNodeSetExecutor>(std::move(setInfo), std::move(tableInfo)); |
| 76 | } |
| 77 | |
| 78 | std::unique_ptr<PhysicalOperator> PlanMapper::mapSetProperty( |
| 79 | const LogicalOperator* logicalOperator) { |
nothing calls this directly
no test coverage detected