Skip to content

Commit

Permalink
return empty when the TagName OR edgeName of current row is different… (
Browse files Browse the repository at this point in the history
vesoft-inc#483)

* return empty when the TagName OR edgeName of current row is different from the TagName OR edgeName to be processed

* address comment

Co-authored-by: Doodle <[email protected]>
  • Loading branch information
nevermore3 and critical27 authored Jun 17, 2021
1 parent b0b98b7 commit 25d8772
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/storage/context/StorageExpressionContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Value StorageExpressionContext::getEdgeProp(const std::string& edgeName,
}
if (isEdge_ && reader_ != nullptr) {
if (edgeName != name_) {
return Value::kNullValue;
return Value::kEmpty;
}
if (prop == kSrc) {
auto srcId = NebulaKeyUtils::getSrcId(vIdLen_, key_);
Expand Down Expand Up @@ -81,7 +81,7 @@ Value StorageExpressionContext::getEdgeProp(const std::string& edgeName,
} else {
auto iter = edgeFilters_.find(std::make_pair(edgeName, prop));
if (iter == edgeFilters_.end()) {
return Value::kNullValue;
return Value::kEmpty;
}
VLOG(1) << "Hit srcProp filter for edge " << edgeName << ", prop " << prop;
return iter->second;
Expand All @@ -92,7 +92,7 @@ Value StorageExpressionContext::getSrcProp(const std::string& tagName,
const std::string& prop) const {
if (!isEdge_ && reader_ != nullptr) {
if (tagName != name_) {
return Value::kNullValue;
return Value::kEmpty;
}
if (prop == kVid) {
auto vId = NebulaKeyUtils::getVertexId(vIdLen_, key_);
Expand All @@ -111,7 +111,7 @@ Value StorageExpressionContext::getSrcProp(const std::string& tagName,
} else {
auto iter = tagFilters_.find(std::make_pair(tagName, prop));
if (iter == tagFilters_.end()) {
return Value::kNullValue;
return Value::kEmpty;
}
VLOG(1) << "Hit srcProp filter for tag " << tagName << ", prop " << prop;
return iter->second;
Expand Down

0 comments on commit 25d8772

Please sign in to comment.