GraphScope icon indicating copy to clipboard operation
GraphScope copied to clipboard

refactor(interactive): Support complex graph schema

Open zhanglei1949 opened this issue 9 months ago • 2 comments

Previously we only allow less than 256 labels for vertices and edges in Interactive. In this PR, we make label_t customizable when building. And we introduce a test case to test interactive on a graph with 1000 vertex labels and 1000 edge labels.

  1. Previously we used bit manipulation to construct a unique edge label from <src_label, dst_label, edge_label> triplet. This method doesn't work if the number of labels is larger than 256. To resolve this, we introduce a hashmap in schema.h to maintain the projection from the label triplet to the unique edge_triplet_id
  std::vector<std::tuple<label_t, label_t, label_t>> e_triplet_labels_;
  std::unordered_map<std::tuple<label_t, label_t, label_t>, uint32_t,
                     boost::hash<std::tuple<label_t, label_t, label_t>>>
      e_triplet_to_index_;
  1. Add a CI.
  2. Refactor the code related

zhanglei1949 avatar Feb 27 '25 10:02 zhanglei1949

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 44.76%. Comparing base (aae2c37) to head (9722fe4). Report is 9 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4538      +/-   ##
==========================================
+ Coverage   35.01%   44.76%   +9.74%     
==========================================
  Files         127       12     -115     
  Lines       13299      592   -12707     
==========================================
- Hits         4657      265    -4392     
+ Misses       8642      327    -8315     

see 115 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update aae2c37...9722fe4. Read the comment docs.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar Feb 28 '25 09:02 codecov-commenter

Please check the preview of the documentation changes at https://0b20feab.graphscope-docs-preview.pages.dev

github-actions[bot] avatar Mar 03 '25 07:03 github-actions[bot]