Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Path Search Feature to Qlever #1335

Merged
merged 103 commits into from
Oct 21, 2024
Merged

Conversation

JoBuRo
Copy link
Contributor

@JoBuRo JoBuRo commented Apr 30, 2024

This commit adds a feature that computes all paths between pairs of (source, target) on a given graph. The source, target, and graph can be configured. The syntax to trigger this search is using a SERVICE request with a special IRI. The details of this API are described in the file docs/path_search.md.
The current implementation only supports the computation of all paths, which can be exponentially larger than the number of edges in the graph. The implemented infrastructure makes it simpler to implement additional features for this service in the future, such as:

  • Only return an arbitrary single path between given start and end nodes.
  • Only return the shortest path
  • Only return the longest path (same complexity as "all paths" , but less memory requirements).
  • Return all edges that lie on an path.

Additionally it can be extended by efficiently supporting the LIMIT/OFFSET clauses and lazy evaluation to efficiently support dealing with very large results in the future.

@JoBuRo
Copy link
Contributor Author

JoBuRo commented Apr 30, 2024

Current TODOs:

  • Implement federated query parsing for path search
  • Improve estimates of the PathSearch operation
  • Check if building the ResultTable can be improved
  • Refactor PathSearch into smaller classes

Copy link

codecov bot commented Apr 30, 2024

Codecov Report

Attention: Patch coverage is 90.37657% with 46 lines in your changes missing coverage. Please review.

Project coverage is 88.49%. Comparing base (414f50c) to head (aa632a1).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/engine/QueryPlanner.cpp 75.34% 11 Missing and 7 partials ⚠️
src/engine/PathSearch.cpp 94.38% 6 Missing and 9 partials ⚠️
src/parser/GraphPatternOperation.cpp 88.88% 5 Missing and 6 partials ⚠️
src/engine/CheckUsePatternTrick.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1335      +/-   ##
==========================================
+ Coverage   88.39%   88.49%   +0.10%     
==========================================
  Files         362      364       +2     
  Lines       27435    27927     +492     
  Branches     3706     3802      +96     
==========================================
+ Hits        24251    24715     +464     
- Misses       1943     1960      +17     
- Partials     1241     1252      +11     

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

Copy link

Quality Gate Passed Quality Gate passed

Issues
17 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@JoBuRo JoBuRo marked this pull request as ready for review June 26, 2024 07:33
@JoBuRo JoBuRo requested a review from joka921 October 4, 2024 16:25
Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

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

Thank you very much, we'll try this out today.

@joka921 joka921 merged commit 2ebca4d into ad-freiburg:master Oct 21, 2024
18 checks passed
@sparql-conformance
Copy link

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants