[Improve][Connector-V2] Migrate IoTDBv2 SQL dialect validation to OptionRule - #11839
Open
liziing wants to merge 2 commits into
Open
[Improve][Connector-V2] Migrate IoTDBv2 SQL dialect validation to OptionRule#11839liziing wants to merge 2 commits into
liziing wants to merge 2 commits into
Conversation
liziing
marked this pull request as ready for review
August 17, 2026 10:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of this pull request
Part of #11007.
The IoTDBv2 source and sink factories currently validate
sql_dialectimperatively duringcreateSourceandcreateSink. Because the accepted values are a static configuration rule, this change moves that validation into each factory's declarativeOptionRule.treeandtable, preserving the existing case-insensitive behavior.tree.ConfigValidatorcoverage for omitted, valid, mixed-case, and unsupported values in both source and sink rules.Does this PR introduce any user-facing change?
Yes. Invalid explicit
sql_dialectvalues are now rejected earlier by standard option validation withOptionValidationException. The accepted values, default value, option name, and behavior of valid configurations are unchanged.The English and Chinese connector documentation already state that the supported values are
treeandtableand that the default istree, so no documentation update is required.How was this patch tested?
Test-first verification confirmed that the new invalid-value test failed against the old implementation because no
OptionValidationExceptionwas raised.The final change was verified with:
Results:
IoTDBFactoryTest: 4 tests passed.IoTDBv2SourceSplitEnumeratorTest: 3 tests passed.The full-repository
./mvnw -q -DskipTests verifywas also attempted twice, but Maven dependency resolution stalled on the local network proxy while resolving unrelated transitive dependencies. The scoped IoTDBv2 reactorverifyabove completed successfully.Check list