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

   Follow-up to #12874, as discussed there with @SEZ9 and @DanielLeens. Opened 
separately now that the test-side exclusion is on `dev`.
   
   ### Purpose of this pull request
   
   `numeric_special_value_as_null` (#12792) only applies to reading PostgreSQL 
numeric special values, and only `JdbcSourceFactory` declares it. It was 
defined in `JdbcCommonOptions`, so `JdbcSinkOptions` inherits it too, and 
`JdbcOptionRuleCompletenessTest` had to exclude it from the sink check 
(`NOT_SINK_OPTIONS`).
   
   This PR defines the option where it applies:
   
   - Move `NUMERIC_SPECIAL_VALUE_AS_NULL` from `JdbcCommonOptions` to 
`JdbcSourceOptions`. The key, type, default (`false`) and description are 
unchanged.
   - Point the three references in `JdbcConnectionConfig` (field default, 
`of()`, builder default) at `JdbcSourceOptions`. `JdbcSourceFactory` already 
declares it as `JdbcSourceOptions.NUMERIC_SPECIAL_VALUE_AS_NULL`, which now 
resolves to the same field directly.
   - Remove the `NOT_SINK_OPTIONS` exclusion from 
`JdbcOptionRuleCompletenessTest`. The sink check passes without it because the 
sink options no longer see the key.
   - Keep `testNumericSpecialValueAsNullIsSourceOnly`, which checks that the 
source accepts the key and the sink rejects it.
   
   Impact checked:
   
   - `NUMERIC_SPECIAL_VALUE_AS_NULL` is only referenced inside 
`connector-jdbc`. No other connector, CDC module, engine or core module uses it.
   - The CDC `*IncrementalSourceOptions` classes extend 
`org.apache.seatunnel.connectors.cdc.base.option.JdbcSourceOptions`, a 
different class, so they neither had nor gain the option.
   - #12792 is not in a release yet, so no released public constant moves.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. The option key, type, default and behaviour are the same, and the sink 
still rejects the key in `--check` / `--dry-run`.
   
   ### How was this patch tested?
   
   On JDK 17 against `dev` eceeb0a:
   
   - `./mvnw -pl seatunnel-connectors-v2/connector-jdbc test`: 1155 tests, 0 
failures, 0 errors (6 skipped), including `JdbcOptionRuleCompletenessTest` (3 
tests) with the exclusion removed.
   - `./mvnw -pl 
seatunnel-connectors-v2/connector-cdc/connector-cdc-postgres,seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql
 -am install -DskipTests`: builds.
   
   ### Check list
   
   * [ ] If any new Jar binary package adding in your PR, please add License 
Notice according
     [New License 
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md)
   * [x] If necessary, please update the documentation to describe the new 
feature. https://github.com/apache/seatunnel/tree/dev/docs (not needed, the 
option docs are unchanged)
   * [x] If necessary, please update `incompatible-changes.md` to describe the 
incompatibility caused by this PR. (not needed)
   


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