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

feat(interactive): Add three builtin procedures #4249

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

zhichao-shi
Copy link

@zhichao-shi zhichao-shi commented Sep 23, 2024

This pull request introduces three built-in stored procedures as per the OSPP requirements. The following stored procedures have been implemented:

Shortest Path Between Three Points: A procedure to compute the shortest path between any given three points in the graph.

K-hop Neighbor Traversal from a Specified Node: A procedure that traverses the graph and retrieves all nodes within k hops from a specified starting node.

PageRank Calculation: A procedure to compute the PageRank values of nodes within the graph.

At present, both k_neighbors and shortest_path_among_three only support types where the id input parameter is of type int64. For example, CALL k_neighbors(1L, "person", 2);

This PR addresses the following issue: #3737
Closes #3737

Copy link

welcome bot commented Sep 23, 2024

Thanks for submitting your first pull request! You are awesome! 🤗
Please make sure you have signed the CLA, as this is a mandatory check before a PR being merged.
Welcome to the GraphScope community! 🎉 You can meet the community on DingTalk or Slack.

@CLAassistant
Copy link

CLAassistant commented Sep 23, 2024

CLA assistant check
All committers have signed the CLA.

@zhanglei1949 zhanglei1949 changed the title Add three new builtin stored procedures feat(interactive): Add three builtin procedures Sep 23, 2024

namespace gs {
// A simple app to count the number of vertices of a given label.
class TVSP : public CypherInternalPbWriteAppBase {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please rename the filename, maybe shortest_path.h?

#include "flex/engines/hqps_db/app/interactive_app_base.h"

namespace gs {
// A simple app to count the number of vertices of a given label.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please check the comments,

  • Remove dummy comments
  • Remove chinese comments.

@zhanglei1949
Copy link
Collaborator

Thank you for your contribution! Please ensure your code is formatted by running:

make flex_clformat

It's acceptable if the files haven't been modified as they are already formatted.

@zhanglei1949
Copy link
Collaborator

Please also fix the CodeRefactor issues.

@zhanglei1949
Copy link
Collaborator

Could you please add tests for the builtin procedures introduced? For example : def test_builtin_procedure(interactive_session,neo4j_session, create_modern_graph):

@zhanglei1949
Copy link
Collaborator

Is a performance report available?

Copy link
Contributor

github-actions bot commented Sep 23, 2024

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

@codecov-commenter
Copy link

codecov-commenter commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.78%. Comparing base (4eadc2e) to head (2dc4d50).
Report is 91 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #4249       +/-   ##
===========================================
+ Coverage   46.45%   58.78%   +12.33%     
===========================================
  Files         173       12      -161     
  Lines       16171      592    -15579     
===========================================
- Hits         7512      348     -7164     
+ Misses       8659      244     -8415     

see 185 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 87804de...2dc4d50. Read the comment docs.

@zhichao-shi
Copy link
Author

zhichao-shi commented Sep 26, 2024

Is a performance report available?
Test instructions: Performance testing of built-in stored procedures
Execution time: The execution time of a stored procedure
Printing time: the time when the user receives the results
Test environment:
Alibaba Cloud Ubuntu System
24 cores (vCPU)
48 GiB
DATASET:https://github.com/GraphScope/gstest/tree/master/flex/ldbc-sf01-long-date
Test result:
image
image
image

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.

Enhanced Stored Procedures Development for GraphScope Interactive Graph Query Engine
4 participants