liziing opened a new pull request, #11839:
URL: https://github.com/apache/seatunnel/pull/11839

   ### Purpose of this pull request
   
   Part of #11007.
   
   The IoTDBv2 source and sink factories currently validate `sql_dialect` 
imperatively during `createSource` and `createSink`. Because the accepted 
values are a static configuration rule, this change moves that validation into 
each factory's declarative `OptionRule`.
   
   - Accept only `tree` and `table`, preserving the existing case-insensitive 
behavior.
   - Preserve the existing default value of `tree`.
   - Remove the duplicate runtime unsupported-dialect checks.
   - Add focused `ConfigValidator` coverage 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_dialect` values are now rejected earlier by 
standard option validation with `OptionValidationException`. 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 `tree` and `table` and that the default is `tree`, 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 `OptionValidationException` was 
raised.
   
   The final change was verified with:
   
   ```shell
   ./mvnw spotless:apply
   ./mvnw -q \
     -pl seatunnel-connectors-v2/connector-iotdb-v2 \
     -am \
     -Dmaven.site.skip=true \
     -Dtest=IoTDBFactoryTest,IoTDBv2SourceSplitEnumeratorTest \
     -Dsurefire.failIfNoSpecifiedTests=false \
     verify
   ./mvnw -q -pl seatunnel-connectors-v2/connector-iotdb-v2 spotless:check
   git diff --check origin/dev..HEAD
   ```
   
   Results:
   
   - `IoTDBFactoryTest`: 4 tests passed.
   - `IoTDBv2SourceSplitEnumeratorTest`: 3 tests passed.
   - Total: 7 tests passed, 0 failures, 0 errors, 0 skipped.
   - Full-repository Spotless completed successfully across 288 reactor modules.
   
   The full-repository `./mvnw -q -DskipTests verify` was also attempted twice, 
but Maven dependency resolution stalled on the local network proxy while 
resolving unrelated transitive dependencies. The scoped IoTDBv2 reactor 
`verify` above completed successfully.
   
   ### Check list
   
   - [x] No new binary package or dependency is added.
   - [x] Existing English and Chinese docs already describe the accepted values 
and default.
   - [x] No incompatible option, API, or SPI change is introduced.
   - [x] This updates an existing connector, so plugin mapping, distribution 
POM, label scope, and plugin configuration changes are not required.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to