| 95 | } |
| 96 | |
| 97 | bool PathPropertyProbe::getNextTuplesInternal(ExecutionContext* context) { |
| 98 | if (!children[0]->getNextTuple(context)) { |
| 99 | return false; |
| 100 | } |
| 101 | auto sizeProbed = 0u; |
| 102 | // Copy node IDs |
| 103 | if (inputNodeIDsVector != nullptr) { |
| 104 | pathNodesVector->resetAuxiliaryBuffer(); |
| 105 | copyListEntry(*inputNodeIDsVector, pathNodesVector); |
| 106 | copyInternalID(inputNodeIDsVector, pathNodeIDsDataVector, pathNodeLabelsDataVector, |
| 107 | info.tableIDToName); |
| 108 | } |
| 109 | // Scan node properties |
| 110 | if (sharedState->nodeHashTableState != nullptr) { |
| 111 | auto nodeHashTable = sharedState->nodeHashTableState->getHashTable(); |
| 112 | auto nodeDataSize = ListVector::getDataVectorSize(pathNodesVector); |
| 113 | while (sizeProbed < nodeDataSize) { |
| 114 | auto sizeToProbe = |
| 115 | std::min<uint64_t>(DEFAULT_VECTOR_CAPACITY, nodeDataSize - sizeProbed); |
| 116 | probe(nodeHashTable, sizeProbed, sizeToProbe, pathNodeIDsDataVector, |
| 117 | pathNodesPropertyDataVectors, info.nodeTableColumnIndices, "node"); |
| 118 | sizeProbed += sizeToProbe; |
| 119 | } |
| 120 | } |
| 121 | // Copy rel IDs |
| 122 | if (inputRelIDsVector != nullptr) { |
| 123 | pathRelsVector->resetAuxiliaryBuffer(); |
| 124 | copyListEntry(*inputRelIDsVector, pathRelsVector); |
| 125 | copyInternalID(inputRelIDsVector, pathRelIDsDataVector, pathRelLabelsDataVector, |
| 126 | info.tableIDToName); |
| 127 | } |
| 128 | // Scan rel property |
| 129 | if (sharedState->relHashTableState != nullptr) { |
| 130 | auto relHashTable = sharedState->relHashTableState->getHashTable(); |
| 131 | auto relDataSize = ListVector::getDataVectorSize(pathRelsVector); |
| 132 | sizeProbed = 0u; |
| 133 | while (sizeProbed < relDataSize) { |
| 134 | auto sizeToProbe = |
| 135 | std::min<uint64_t>(DEFAULT_VECTOR_CAPACITY, relDataSize - sizeProbed); |
| 136 | probe(relHashTable, sizeProbed, sizeToProbe, pathRelIDsDataVector, |
| 137 | pathRelsPropertyDataVectors, info.relTableColumnIndices, "rel"); |
| 138 | sizeProbed += sizeToProbe; |
| 139 | } |
| 140 | } |
| 141 | if (inputNodeIDsVector == nullptr || inputRelIDsVector == nullptr) { |
| 142 | return true; |
| 143 | } |
| 144 | auto& selVector = inputNodeIDsVector->state->getSelVector(); |
| 145 | auto inputNodeIDsDataVector = ListVector::getDataVector(inputNodeIDsVector); |
| 146 | // Copy rel src&dst IDs |
| 147 | |
| 148 | switch (info.extendDirection) { |
| 149 | case ExtendDirection::FWD: { |
| 150 | if (info.extendFromLeft) { |
| 151 | // Example graph src->1->2->3->dst |
| 152 | // Input: src, dst, [1, 2, 3] |
| 153 | // Output: |
| 154 | // - srcIDs [src, 1, 2, 3] |
nothing calls this directly
no test coverage detected