Skip to content

fix: correct namespace plugin name existence query(#6717) - #7016

Open
juicewcode wants to merge 1 commit into
apache:masterfrom
juicewcode:fix/6717-namespace-plugin-rel-name
Open

fix: correct namespace plugin name existence query(#6717)#7016
juicewcode wants to merge 1 commit into
apache:masterfrom
juicewcode:fix/6717-namespace-plugin-rel-name

Conversation

@juicewcode

Copy link
Copy Markdown
Contributor

Fixes #6717

Summary

  • Fix NamespacePluginRelMapper.nameExistedExclude, which queried the
    non-existent name column from namespace_plugin_rel.
  • The query now joins the plugin table and checks plugin.name.
    A mapper test was added to cover matching, excluded, and missing plugin names.

Test

  • Matching plugin name returns true.
  • Excluded plugin ID returns null.
  • Non-existent plugin name returns null.

Make sure that:

  • You have read the contribution guidelines.
  • You submit test cases (unit or integration tests) that back your changes.
  • Your local test passed ./mvnw clean install -Dmaven.javadoc.skip=true.

  Modify the `namespace-plugin-rel-sqlmap.xml` file's `nameExistedExclude` query:

  - Associate `namespace_plugin_rel` with the `plugin` table.
  - Query the plugin name using `plugin.name`.
  - Add table aliases for `plugin_id` and `namespace_id` to avoid ambiguity in field names.

  Add Mapper test cases:

  - Verify that it returns true when the name matches.
  - Verify that it returns null when excluding the specified plugin.
  - Verify that it returns null when the name does not exist.
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.

[BUG] namespace_plugin_rel.nameExistedExclude queries non-existent name column

1 participant