hyoj-dev commented on issue #11007:
URL: https://github.com/apache/seatunnel/issues/11007#issuecomment-5522929195

   > Thanks, [@hyoj-dev](https://github.com/hyoj-dev) and 
[@yigitcan-ozturk](https://github.com/yigitcan-ozturk). I checked current dev 
and the open PR set: connector-aerospike and connector-qdrant both already have 
OptionRule surfaces, and there is no active connector-specific OptionRule 
migration PR for either. Before this becomes a code claim, please each post the 
exact remaining imperative validation you find and why it is deterministic 
enough for OptionRule or Conditions. Keep one connector per PR, preserve 
broker, network, server, and data-dependent checks at runtime, and add focused 
valid and invalid factory validation tests. A no-change audit is the correct 
outcome if the existing rules already cover the contract; please do not create 
a migration PR solely to claim the tracker.
   
   Hi! I audited `connector-aerospike` against the current `dev` branch and 
found one remaining imperative validation and two related deterministic 
validation gaps I'd like to confirm.
   
   1. **`data_format`** — `AerospikeSinkWriter#write()` calls 
`DataFormatType.fromString()`, which currently rejects values other than `map`, 
`string`, and `kv` at runtime. Since this depends only on configuration, I 
believe it can move to `OptionRule` using `Conditions.matches()` while 
preserving the current case-insensitive behavior.
   
   2. **`bin_name`** — it is used for `map` and `string`, but not for `kv`, 
while it is currently always optional in `optionRule()`. Since this requirement 
depends only on `data_format` and `bin_name`, it can be expressed as a 
conditional declarative rule, although it is not a direct migration of an 
existing `if/throw` check.
   
   3. **`key`** — it is documented as required and used unconditionally by the 
writer, but is currently optional in `optionRule()`. I believe its presence can 
be validated declaratively, while checking whether the configured field exists 
in the input schema should remain at runtime.
   
   If this scope is appropriate, I'll add focused factory validation tests for 
these cases. Network/server, schema-dependent, and record-dependent checks will 
remain at runtime.
   
   If `bin_name` or `key` are outside the tracker scope, I'll keep the PR 
limited to the `data_format` migration. Thanks!


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