vesoft-inc / nebula-flink-connector

Flink Connector for Nebula Graph
48 stars 30 forks source link

Add vertex delete with edge #103

Closed StrangerOfDawah closed 4 months ago

StrangerOfDawah commented 4 months ago

What type of PR is this?

What problem(s) does this PR solve?

Issue(s) number:

Description

This patch adds support for deleting vertices along with their edges in the Nebula connector. A new feature flag, isDeleteExecutedWithEdges, is introduced to control this behavior. Additionally, tests are added to verify the new functionality while ensuring existing functionality remains unaffected.

How do you solve it?

  1. NebulaVertices Class:

    • Added a new boolean field isDeleteExecutedWithEdges.
    • Modified the constructor to initialize this field.
    • Updated the getDeleteStatement method to use the appropriate delete template based on the isDeleteExecutedWithEdges flag.
  2. VertexExecutionOptions Class:

    • Added the isDeleteExecutedWithEdges field.
    • Updated the constructor and builder pattern to include this new field.
    • Added a getter method for isDeleteExecutedWithEdges.
  3. NebulaVertexBatchExecutor Class:

    • Passed the isDeleteExecutedWithEdges flag from VertexExecutionOptions to NebulaVertices.
  4. NebulaConstant Class:

    • Added a new delete template DELETE_VERTEX_TEMPLATE_WITH_EDGE.
  5. NebulaVerticesTest Class:

    • Added new test methods testGetDeleteStatementWithEdges and testGetDeleteStatementWithPolicyAndEdges to validate the new delete behavior.

Special notes for your reviewer

StrangerOfDawah commented 4 months ago

@Nicole00 how is everything going?

nick13145 commented 4 months ago

@Nicole00 could you publish new version of that library? https://central.sonatype.com/artifact/com.vesoft/nebula-flink-connector/versions At the moment there are no any new versions since 26 April.

Thanks in advance

StrangerOfDawah commented 4 months ago

@wey-gu @Nicole00 Hi!

Can you please increment the version so that the new version is recorded in the public artifacts?

wey-gu commented 4 months ago

@Nicole00 could we create a minor version release?

Nicole00 commented 4 months ago

@Nicole00 could we create a minor version release?

Yeah, we can publish a minor version.

Nicole00 commented 4 months ago

@nick13145 @StrangerOfDawah @wey-gu version 3.8.1 already released to https://repo1.maven.org/maven2/com/vesoft/nebula-flink-connector/