SEZ9 commented on issue #13232: URL: https://github.com/apache/seatunnel/issues/13232#issuecomment-6843210393
Thanks @goutamadwant for picking this up, and thanks @nzw921rx for routing it. Moving the replica-count validation into `MultiTableSinkFactory.optionRule()` as a declarative `Conditions.greaterThan` rule is the direction we want here, and keeping the actual rejected value (e.g. `-1`) in the diagnostic is indeed part of the acceptance criteria for this issue, so good to hear that is preserved in #13238. A few things I'd like to confirm on #13238 before we close this out: 1. The old constructor-side check in `MultiTableSink` is fully removed, so the factory `OptionRule` is the single place the `>= 1` constraint lives (no duplicate validation paths). 2. The rule is expressed via `Conditions.greaterThan` on the replica-count option rather than ad-hoc code in the factory, so it is visible through the normal option-rule introspection. 3. Tests go through `FactoryUtil.createMultiTableSink()` and cover at least: a valid value (`1`), zero, and a negative value, asserting both that creation fails and that the error message contains the rejected value. If any of these are already in place, a short pointer in the PR description is enough. I'll review #13238 once you confirm. <!-- streview-comment:2317 --> -- 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]
