-
Notifications
You must be signed in to change notification settings - Fork 2k
[improve] selectdb options #9252
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
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request refactors the SelectDB sink connector configuration to use the new SelectDBConfig and SelectDBSinkOptions instead of the legacy Config, streamlining and modernizing the configuration management.
- Refactored the sink writer, committer, and sink to accept a SelectDBConfig and CatalogTable instead of a generic Config.
- Updated the configuration loading in SelectDBConfig to work with ReadonlyConfig and new option definitions.
- Adjusted connector option tests by removing the whitelist entry for SelectDBSinkOptions.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
seatunnel-connectors-v2/connector-selectdb-cloud/src/main/java/org/apache/seatunnel/connectors/selectdb/sink/writer/SelectDBSinkWriter.java | Updated to use SelectDBConfig instead of Config. |
seatunnel-connectors-v2/connector-selectdb-cloud/src/main/java/org/apache/seatunnel/connectors/selectdb/sink/committer/SelectDBCommitter.java | Refactored to use SelectDBConfig directly. |
seatunnel-connectors-v2/connector-selectdb-cloud/src/main/java/org/apache/seatunnel/connectors/selectdb/sink/SelectDBSink.java | Modified to load configuration using the new config methods and handle CatalogTable. |
seatunnel-connectors-v2/connector-selectdb-cloud/src/main/java/org/apache/seatunnel/connectors/selectdb/config/SelectDBSinkOptions.java | Introduced new configuration options for the SelectDB sink. |
seatunnel-connectors-v2/connector-selectdb-cloud/src/main/java/org/apache/seatunnel/connectors/selectdb/config/SelectDBConfig.java | Updated loadConfig method to use ReadonlyConfig and new options. |
seatunnel-ci-tools/src/test/java/org/apache/seatunnel/api/ConnectorOptionCheckTest.java | Removed the whitelist entry for SelectDBSinkOptions to update test validations. |
Comments suppressed due to low confidence (1)
seatunnel-ci-tools/src/test/java/org/apache/seatunnel/api/ConnectorOptionCheckTest.java:204
- Ensure that removing 'SelectDBSinkOptions' from the whitelist does not inadvertently reduce test coverage for connector options validation.
whiteList.add("SelectDBSinkOptions");
} | ||
selectdbConfig.setLabelPrefix(pluginConfig.get(SelectDBSinkOptions.SINK_LABEL_PREFIX)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Verify that the default value for SINK_LABEL_PREFIX is consistently provided through pluginConfig to ensure that the label prefix is never null.
selectdbConfig.setLabelPrefix(pluginConfig.get(SelectDBSinkOptions.SINK_LABEL_PREFIX)); | |
selectdbConfig.setLabelPrefix( | |
pluginConfig.getOptional(SelectDBSinkOptions.SINK_LABEL_PREFIX) | |
.orElse("default_label_prefix")); |
Copilot uses AI. Check for mistakes.
Purpose of this pull request
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide
release-note
.