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 vertex delete with edge #103

Merged

Conversation

StrangerOfDawah
Copy link
Contributor

What type of PR is this?

  • bug
  • feature
  • enhancement

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

  • Impact: This patch maintains backward compatibility by preserving the existing delete functionality. The new feature is controlled by the isDeleteExecutedWithEdges flag, ensuring that existing code paths remain unchanged unless explicitly modified to use the new feature.
  • Design Document: The design follows the existing pattern of handling execution options and statements in the Nebula connector. The addition of a feature flag allows for flexible extension of delete behavior without intrusive changes.
  • Testing: Comprehensive tests have been added to verify both the new and existing functionalities.

Copy link

@wey-gu wey-gu left a comment

Choose a reason for hiding this comment

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

Thanks!🫡

@wey-gu wey-gu requested a review from Nicole00 May 23, 2024 14:08
@StrangerOfDawah
Copy link
Contributor Author

@Nicole00 how is everything going?

Copy link
Contributor

@Nicole00 Nicole00 left a comment

Choose a reason for hiding this comment

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

LGTM, excellent job!

@Nicole00 Nicole00 merged commit 755c88f into vesoft-inc:master May 24, 2024
2 checks passed
@nick13145
Copy link

@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
Copy link
Contributor Author

@wey-gu @Nicole00 Hi!

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

@wey-gu
Copy link

wey-gu commented May 28, 2024

@Nicole00 could we create a minor version release?

@Nicole00
Copy link
Contributor

@Nicole00 could we create a minor version release?

Yeah, we can publish a minor version.

@Nicole00
Copy link
Contributor

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

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.

4 participants