GraphScope
GraphScope copied to clipboard
refactor(interactive): Support complex graph schema
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.
- 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_;
- Add a CI.
- Refactor the code related
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
@@ 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 dataPowered 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.
Please check the preview of the documentation changes at https://0b20feab.graphscope-docs-preview.pages.dev