Skip to content

Commit

Permalink
fixed expression check for invalid edge (#2235)
Browse files Browse the repository at this point in the history
Co-authored-by: dangleptr <[email protected]>
  • Loading branch information
bright-starry-sky and dangleptr authored Jul 21, 2020
1 parent b4378b0 commit 93d11b3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/storage/query/QueryBaseProcessor.inl
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ kvstore::ResultCode QueryBaseProcessor<REQ, RESP>::collectEdgeProps(
"Edge `%s' not found when call getters.", edgeName.c_str());
}
if (std::abs(edgeType) != edgeFound->second) {
return Status::Error("Ignore this edge");
return Status::Error("Ignore this edge : %s", edgeFound->first.c_str());
}

if (prop == _SRC) {
Expand Down Expand Up @@ -575,7 +575,7 @@ kvstore::ResultCode QueryBaseProcessor<REQ, RESP>::collectEdgeProps(
"Edge `%s' not found when call getters.", edgeName.c_str());
}
if (std::abs(edgeType) != edgeFound->second) {
return Status::Error("Ignore this edge");
return Status::Error("Ignore this edge : %s", edgeFound->first.c_str());
}
return dstId;
};
Expand All @@ -590,6 +590,10 @@ kvstore::ResultCode QueryBaseProcessor<REQ, RESP>::collectEdgeProps(
return it->second;
};
auto value = exp_->eval(getters);
if (!value.ok()) {
VLOG(3) << value.status();
continue;
}
if (value.ok() && !Expression::asBool(value.value())) {
VLOG(1) << "Filter the edge "
<< vId << "-> " << dstId << "@" << rank << ":" << edgeType;
Expand Down

0 comments on commit 93d11b3

Please sign in to comment.