Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
nevermore3 committed Apr 22, 2022
1 parent 6e9374a commit 66663a8
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/graph/planner/match/PropIndexSeek.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ StatusOr<SubPlan> PropIndexSeek::transformEdge(EdgeContext* edgeCtx) {
}

bool PropIndexSeek::matchNode(NodeContext* nodeCtx) {
NodeInfo* node = nodeCtx->info;
if (node->labels.size() != 1) {
auto& node = *nodeCtx->info;
if (node.labels.size() != 1) {
// TODO multiple tag index seek need the IndexScan support
VLOG(2) << "Multiple tag index seek is not supported now.";
return false;
Expand All @@ -128,16 +128,16 @@ bool PropIndexSeek::matchNode(NodeContext* nodeCtx) {
filterInWhere = MatchSolver::makeIndexFilter(
node.labels.back(), node.alias, nodeCtx->bindFilter, nodeCtx->qctx);
}
if (!nodeInfo->labelProps.empty()) {
auto props = nodeInfo->labelProps.back();
if (!node.labelProps.empty()) {
auto props = node.labelProps.back();
if (props != nullptr) {
filterInPattern = MatchSolver::makeIndexFilter(node.labels.back(), props, nodeCtx->qctx);
}
}

Expression* filter = nullptr;
if (!filterInPattern && !filterInWhere) {
return {};
return false;
} else if (!filterInPattern) {
filter = filterInWhere;
} else if (!filterInWhere) {
Expand All @@ -146,7 +146,11 @@ bool PropIndexSeek::matchNode(NodeContext* nodeCtx) {
filter = LogicalExpression::makeAnd(nodeCtx->qctx->objPool(), filterInPattern, filterInWhere);
}

return filter;
nodeCtx->scanInfo.filter = filter;
nodeCtx->scanInfo.schemaIds = node.tids;
nodeCtx->scanInfo.schemaNames = node.labels;

return true;
}

StatusOr<SubPlan> PropIndexSeek::transformNode(NodeContext* nodeCtx) {
Expand Down

0 comments on commit 66663a8

Please sign in to comment.