fatmanverse commented on issue #12874: URL: https://github.com/apache/seatunnel/issues/12874#issuecomment-6263642708
On @SEZ9's question whether the option could live in `JdbcSourceOptions` instead: I tried it, and it works without touching the test. - `NUMERIC_SPECIAL_VALUE_AS_NULL` is only referenced inside `connector-jdbc`: `JdbcSourceFactory#optionRule`, and `JdbcConnectionConfig` (field default, `of()` and the builder default). No CDC module or other connector uses it. The CDC `*IncrementalSourceOptions` classes extend `org.apache.seatunnel.connectors.cdc.base.option.JdbcSourceOptions`, a different class, so they do not inherit it either way. - Moving the field from `JdbcCommonOptions` to `JdbcSourceOptions` and pointing the three `JdbcConnectionConfig` references at `JdbcSourceOptions` is a change in 3 main files, plus one test. The key, type, default and description stay the same, and #12792 is not in a release yet, so users see no change. - With that move, `JdbcOptionRuleCompletenessTest` passes as it is: the sink test no longer sees the key through `JdbcSinkOptions -> JdbcCommonOptions`, so no `NOT_SINK_OPTIONS` list is needed. I added a sink-side guard (`JdbcSinkFactoryTest`: the sink still rejects `numeric_special_value_as_null`). Verified on JDK 17 against `dev` e2957d2: the full `connector-jdbc` unit tests pass (0 failures, including `testSinkRuleDeclaresAllSinkOptions`), and `connector-cdc-postgres` / `connector-cdc-mysql` still build. The diff is ready on my fork: https://github.com/fatmanverse/seatunnel/compare/dev...fatmanverse:seatunnel:move-numeric-special-option-to-source @hutiefang76 this is your issue and #12875 already fixes dev, so I'm not opening a competing PR. If you and the reviewers prefer the move, feel free to take the diff into #12875, or tell me and I'll open it as a separate PR. The exclusion list in #12875 is fine to unblock CI either way. -- 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]
