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

   ### Purpose of this pull request
   
   This PR implements the confirmed `connector-iotdb` Source-only slice of 
#11007 (scope confirmation: 
https://github.com/apache/seatunnel/issues/11007#issuecomment-5931142175).
   
   Root-level `sql` is optional because it is exclusive with `tables_configs`. 
The existing `SingleTableValidator` checks that root SQL has a schema, but an 
explicitly empty or whitespace-only SQL value previously passed factory 
validation. This adds `Conditions.notBlank(SQL)` to the existing optional SQL 
rule, without changing its requiredness or the `sql`/`tables_configs` 
exclusivity.
   
   SQL parsing, schema rules, node URLs, credentials, partitioning, the Sink, 
and runtime/client behavior are unchanged.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. An explicitly configured blank root-level `sql` is rejected during 
option validation. A valid root-level SQL query with schema remains accepted; a 
valid `tables_configs` configuration with no root SQL remains accepted. 
Nonblank SQL with surrounding whitespace is accepted as-is and is not trimmed.
   
   The English and Chinese IoTDB Source docs now state the root SQL nonblank 
requirement.
   
   ### How was this patch tested?
   
   - Added focused factory/`ConfigValidator` tests for empty, spaces-only, and 
tab-only root SQL, valid padded root SQL, and valid `tables_configs` without 
root SQL.
   - Before adding the condition, the empty and spaces-only tests failed 
because no `OptionValidationException` was thrown. The tab fixture was then 
corrected to use a config-escaped tab; it passes with the new rule.
   - `mvn -o -pl seatunnel-connectors-v2/connector-iotdb verify` passed on JDK 
11: 45 tests, 0 failures/errors; formatting check, packaging, and shading 
passed.
   - `git diff --check` passed.
   
   ### Check list
   
   * [x] Updated English and Chinese IoTDB Source docs.
   * [x] Added positive and negative factory validation tests.
   * [x] No new binary dependency, connector registration, distribution 
configuration, or E2E setup change; this updates validation in an existing 
connector.
   


-- 
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