seatunnel icon indicating copy to clipboard operation
seatunnel copied to clipboard

[Fix][Jdbc Connector]: Fix JdbcCatalogOptions BASE builder will be changed by call `required()`

Open Jetiaime opened this issue 9 months ago • 2 comments

Purpose of this pull request

JdbcCatalogOptions BASE builder will be changed by call required() because it just a static variable and Builder inner list will be changed if you are using code like this:

OceanBaseCatalogFactory factory = new OceanBaseCatalogFactory();
factory.optionRule();
factory.optionRule();

So change the BASE variable to a function, when we call the base() function, it will create a new Builder, so it will be new every call;

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Check list

  • [ ] If any new Jar binary package adding in your PR, please add License Notice according New License Guide
  • [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
  • [ ] If you are contributing the connector code, please check that the following files are updated:
    1. Update change log that in connector document. For more details you can refer to connector-v2
    2. Update plugin-mapping.properties and add new connector information in it
    3. Update the pom file of seatunnel-dist
  • [ ] Update the release-note.

Jetiaime avatar May 02 '24 09:05 Jetiaime

Hi @Jetiaime , thanks for open this PR! Please follow the guide to open CI on your fork repository. https://github.com/apache/seatunnel/pull/6788/checks?check_run_id=24501297956

Hisoka-X avatar May 06 '24 02:05 Hisoka-X

Overall LGTM

Hisoka-X avatar May 06 '24 02:05 Hisoka-X