Skip to content

Conversation

kaori-seasons
Copy link

@kaori-seasons kaori-seasons commented Dec 31, 2023

For the specific discussion thread about this PR, please see: https://lists.apache.org/thread/s0cg1v0fqg84wxnq0gb0kyrb5074gxjh

Background See CALCITE-6171

  1. Parse the select/group by/having/order by in the node into the traversal of Gremlin syntax
  2. Traverse the method to complete the generation of the scanning method
  3. After generating the scanning method based on the syntax node, generate the project traversal steps based on the specified label.
  4. Rewrite the filter and scan in the execution plan and push them down
  5. When completing a multi-table join, pre-determine whether the table fragment data hits the target and whether the expected data can be returned under the conditions of the scanning method.

I am currently improving the relevant integration tests for it. If you have any questions about this PR, friends in the community are welcome to give relevant suggestions.

@kaori-seasons
Copy link
Author

kaori-seasons commented Dec 31, 2023

@asolimando @libenchao @XuQianJin-Stars @pengzhiwei2018

During this PR release, I noticed that you gave relevant suggestions on the mailing list. Can you take the time to review the PR?

@JiajunBernoulli
Copy link
Contributor

@kaori-seasons
Thank you for writing so much code.

Please fix CI and add document in site like kafka_adapter.

That will help others review your code.

@kaori-seasons
Copy link
Author

@kaori-seasons Thank you for writing so much code.

Please fix CI and add document in site like kafka_adapter.

That will help others review your code.

Hello, sorry for the late reply, thank you for your reminder. There are some things that need to be dealt with. I'll fix the ci at the start of Friday.

@XuQianJin-Stars
Copy link
Contributor

Thank you for this feature. please check the ci pass.

@kaori-seasons
Copy link
Author

@kaori-seasons Thank you for writing so much code.

Please fix CI and add document in site like kafka_adapter.

That will help others review your code.

@JiajunBernoulli
Hello, according to your instructions, I am supplementing the sqlline used by Gremlin Adapter.
But there is a problem in gremlin's native driver. This problem is that every time the user sends the query sql of the point table and edge table to the Gremlinserver query server to complete the query, but the returned context needs to include GraphTraversalSource or TinkerGraph.
Only when any object is used as a data source can we perform graph traversal operations based on this, as shown below

Object result = acceptor.connect(Arrays.asList(Storage.toPath(ConfigureSupport.generateTempFileFromResource(this.getClass(), "gremlin-server-integration.yaml", ".tmp")), "session-managed"));
      TinkerGraph graph = (TinkerGraph) result;
      GraphTraversalSource g = graph.traversal();
      g.addVertex('name','stephen');g.addVertex('name','marko');g.traversal().V()"

This means that I need to implement a new driver, which is the GremlinRemoteDriver in the code listing, to obtain the GraphTraversalSource or TinkerGraph object.
This work will take up more time, I will continue to complete this PR after it is ready.

@kaori-seasons
Copy link
Author

kaori-seasons commented Feb 6, 2024

@JiajunBernoulli
Hello, I have fixed possible errors related to ci according to calcite's documentation, but when I run ci, I found the following error.

In fact, in the root file of gradle, I have added the gremlin module to module management. Since I am not familiar with gradle, can you please provide me with some guidance?

In addition, when I added unit tests for Gremlin, I noticed that since graph database queries rely on gremlin-server as the query frontend for communication, a gremlin-server is needed as a resident process, which means that integration tests need to be added like druid. Dependent components will be further communicated with you at that time.

Happy New Year.

Could not determine the dependencies of task ':gremlin:forbiddenApisTest'.
> Could not resolve all task dependencies for configuration ':gremlin:testCompileClasspath'.
   > Could not resolve project :core.
     Required by:
         project :gremlin
      > Project :gremlin declares a dependency from configuration 

Copy link

github-actions bot commented Dec 7, 2024

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

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

Successfully merging this pull request may close these issues.

3 participants