Skip to content

Commit

Permalink
Improve GetInnerVertex() by querying local fragment only (#2772)
Browse files Browse the repository at this point in the history
## What do these changes do?

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 <zhangsongqing164@163.com>
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
Co-authored-by: Tao He <linzhu.ht@alibaba-inc.com>
  • Loading branch information
songqing and sighingnow committed May 30, 2023
1 parent 983a41e commit 5b46a68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ clean:
client: learning
cd $(CLIENT_DIR) && \
python3 -m pip install -r requirements.txt -r requirements-dev.txt --user && \
export PATH=$(PATH):$(HOME)/.local/bin && \
python3 setup.py build_ext --inplace --user
if [[ "${ARCH}" == "aarch64" ]]; then \
python3 setup.py bdist_wheel; \
Expand Down
8 changes: 3 additions & 5 deletions analytical_engine/core/fragment/arrow_projected_fragment.h
Original file line number Diff line number Diff line change
Expand Up @@ -822,11 +822,9 @@ class ArrowProjectedFragment

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

0 comments on commit 5b46a68

Please sign in to comment.