Skip to content

Commit

Permalink
fix tagless (#4652)
Browse files Browse the repository at this point in the history
* fix tagless

* fix test

Co-authored-by: Sophie <[email protected]>
  • Loading branch information
nevermore3 and Sophie-Xie authored Sep 19, 2022
1 parent c4cd891 commit 480b29a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 53 deletions.
24 changes: 14 additions & 10 deletions src/graph/visitor/PrunePropertiesVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,13 @@ void PrunePropertiesVisitor::pruneCurrent(AppendVertices *node) {
node->setVertexProps(nullptr);
} else {
// only get _tag when props is nullptr
auto tagId = vertexProps->front().tag_ref().value();
VertexProp newVProp;
newVProp.tag_ref() = tagId;
newVProp.props_ref() = {nebula::kTag};
prunedVertexProps->emplace_back(std::move(newVProp));
for (auto &vertexProp : *vertexProps) {
auto tagId = vertexProp.tag_ref().value();
VertexProp newVProp;
newVProp.tag_ref() = tagId;
newVProp.props_ref() = {nebula::kTag};
prunedVertexProps->emplace_back(std::move(newVProp));
}
node->setVertexProps(std::move(prunedVertexProps));
}
return;
Expand All @@ -373,11 +375,13 @@ void PrunePropertiesVisitor::pruneCurrent(AppendVertices *node) {
node->setVertexProps(nullptr);
} else {
// only get _tag when props is nullptr
auto tagId = vertexProps->front().tag_ref().value();
VertexProp newVProp;
newVProp.tag_ref() = tagId;
newVProp.props_ref() = {nebula::kTag};
prunedVertexProps->emplace_back(std::move(newVProp));
for (auto &vertexProp : *vertexProps) {
auto tagId = vertexProp.tag_ref().value();
VertexProp newVProp;
newVProp.tag_ref() = tagId;
newVProp.props_ref() = {nebula::kTag};
prunedVertexProps->emplace_back(std::move(newVProp));
}
node->setVertexProps(std::move(prunedVertexProps));
}
return;
Expand Down
Loading

0 comments on commit 480b29a

Please sign in to comment.