Skip to content

feat: optimising adjacency edge queries#2242

Merged
javeme merged 31 commits intoapache:masterfrom
msgui:edge_queries_optimize
Nov 29, 2023
Merged

feat: optimising adjacency edge queries#2242
javeme merged 31 commits intoapache:masterfrom
msgui:edge_queries_optimize

Conversation

@msgui
Copy link
Copy Markdown
Contributor

@msgui msgui commented Jul 11, 2023

Purpose of the PR

  • I have completed Task 13-6.
Task13-6

Main Changes

I have added the EdgeExistenceAPI and EdgeExistenceTraverser, which provide enhanced queries for checking the existence of adjacency edges.

Verifying these changes

  • Trivial rework / code cleanup without any test coverage. (No Need)
  • Already covered by existing tests, such as (please modify tests here).
  • Need tests and can be verified as follows:
    • graph:
      graph

    • GET http://{ip:port}/graphs/{graph}/traversers/edgeexistence?source=2:lop&target=1:vadas&edgelabel=knows
      1

    • GET http://{ip:port}/graphs/{graph}/traversers/edgeexistence?source=1:marko&target=1:vadas
      2

    • GET http://{ip:port}/graphs/{graph}/traversers/edgeexistence?source=1:marko
      3

    • GET http://{ip:port}/graphs/{graph}/traversers/edgeexistence?source=2:lop&target=1:vadas&edgelabel=knows
      4

    • GET http://{ip:port}/{graph}/traversers/edgeexistence?target=1:vadas&source=1:marko&limit=0
      5

Does this PR potentially affect the following parts?

  • Nope
  • Dependencies (add/update license info)
  • Modify configurations
  • The public API
  • Other affects (typed here)

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - No Need

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 11, 2023

Codecov Report

Attention: 30 lines in your changes are missing coverage. Please review.

Comparison is base (197e8a0) 66.31% compared to head (c0e2ea6) 65.82%.

Files Patch % Lines
...ph/traversal/algorithm/EdgeExistenceTraverser.java 0.00% 18 Missing ⚠️
...che/hugegraph/api/traversers/EdgeExistenceAPI.java 0.00% 12 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2242      +/-   ##
============================================
- Coverage     66.31%   65.82%   -0.50%     
+ Complexity      830      826       -4     
============================================
  Files           507      509       +2     
  Lines         42073    42103      +30     
  Branches       5831     5832       +1     
============================================
- Hits          27902    27715     -187     
- Misses        11415    11633     +218     
+ Partials       2756     2755       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@imbajin imbajin requested review from imbajin, javeme and zyxxoo July 12, 2023 00:13
@imbajin
Copy link
Copy Markdown
Member

imbajin commented Jul 12, 2023

Thanks, could also open a summary issue for it (let other people know the progress of it & comment to assign)

BTW, before submit PR we could open a single issue for it first (and discuss the main context then finish it) 🔢

@msgui msgui requested a review from javeme July 12, 2023 15:58
@msgui msgui marked this pull request as draft July 13, 2023 04:04
@msgui msgui marked this pull request as ready for review July 25, 2023 03:38
@msgui msgui requested a review from javeme August 21, 2023 14:00
@msgui
Copy link
Copy Markdown
Contributor Author

msgui commented Nov 21, 2023

It seems fine now, Thanks. Next step let’s adapt the client and add some test cases. how-to: hugegraph/hugegraph-client#84

Ok, it's done. Currently, the client CI tests are showing 404.
It seems like we'll need this PR merged first before we can test it properly.

@msgui msgui requested a review from javeme November 21, 2023 15:53
javeme
javeme previously approved these changes Nov 21, 2023
javeme
javeme previously approved these changes Nov 25, 2023
Copy link
Copy Markdown
Contributor

@javeme javeme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@javeme
Copy link
Copy Markdown
Contributor

javeme commented Nov 25, 2023

TODO: update apiversion like #2360 (comment)

@javeme
Copy link
Copy Markdown
Contributor

javeme commented Nov 27, 2023

please pull the latest master code and do git rebase -i master on this commit

@msgui msgui force-pushed the edge_queries_optimize branch from ab4ea2c to 89b34b3 Compare November 28, 2023 04:03
Copy link
Copy Markdown
Contributor

@javeme javeme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@javeme javeme merged commit ed493f3 into apache:master Nov 29, 2023
VGalaxies pushed a commit to VGalaxies/incubator-hugegraph that referenced this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

4 participants