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): Implement a c++ wrapper for compiler's GraphPlanner #4310

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

Conversation

zhanglei1949
Copy link
Collaborator

@zhanglei1949 zhanglei1949 commented Nov 4, 2024

  • Implement a JNI-based c++ Wrapper for compiler's GraphPlanner, which is used to generate physical plan from a cypher query string.
  • Some minor fix for compiler's code.

Fix #4306

Usage:

gs::jni::GraphPlannerWrapper planner(java_path, java_library_path, graph_schema_path);
if (!planner.is_valid()) {
  LOG(ERROR) << "Invalid GraphPlannerWrapper.";
  return 1;
}
auto plan = planner.CompilePlan(compiler_config_path, cypher_query)

The CompilePlan are exposed by two ways: JNI or REST API, see https://github.com/zhanglei1949/GraphScope/tree/call-compiler-via-jni/interactive_engine/compiler/src/main/native for more usages.

Committed-by: xiaolei.zl from Dev container
Committed-by: xiaolei.zl from Dev container
@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.78%. Comparing base (05254bd) to head (837a07e).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #4310       +/-   ##
===========================================
+ Coverage   34.33%   58.78%   +24.44%     
===========================================
  Files         126       12      -114     
  Lines       13257      592    -12665     
===========================================
- Hits         4552      348     -4204     
+ Misses       8705      244     -8461     

see 126 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 a709f1a...837a07e. Read the comment docs.

Committed-by: xiaolei.zl from Dev container
Copy link
Contributor

github-actions bot commented Nov 4, 2024

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

@zhanglei1949 zhanglei1949 changed the title feat(interactive): Implement a java wrapper for compiler's GraphPlanner feat(interactive): Implement a c++ wrapper for compiler's GraphPlanner Nov 4, 2024
Committed-by: xiaolei.zl from Dev container
@zhanglei1949 zhanglei1949 requested a review from liulx20 November 5, 2024 02:05
shirly121
shirly121 previously approved these changes Nov 5, 2024
Committed-by: xiaolei.zl from Dev container
@liulx20 liulx20 force-pushed the call-compiler-via-jni branch from 44ebffd to e217d75 Compare December 12, 2024 11:01
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.

feat(interactive): Support calling compiler via JNI
3 participants