Skip to content

Commit

Permalink
Improve GetInnerVertex() by querying local fragment only (#1404)
Browse files Browse the repository at this point in the history
The current implementation of GetInnerVertex() is to query all the
fragment, it's not needed as we only need the inner vertex

Signed-off-by: songqing <[email protected]>
  • Loading branch information
songqing authored May 30, 2023
1 parent 19616c8 commit a2cdee5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions modules/graph/fragment/arrow_fragment.vineyard-mod
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,9 @@ class [[vineyard]] ArrowFragment

bool GetInnerVertex(label_id_t label, const oid_t& oid, vertex_t& v) const {
vid_t gid;
if (vm_ptr_->GetGid(label, internal_oid_t(oid), gid)) {
if (vid_parser_.GetFid(gid) == fid_) {
v.SetValue(vid_parser_.GetLid(gid));
return true;
}
if (vm_ptr_->GetGid(fid_, label, internal_oid_t(oid), gid)) {
v.SetValue(vid_parser_.GetLid(gid));
return true;
}
return false;
}
Expand Down

0 comments on commit a2cdee5

Please sign in to comment.