Hi community,

I'd like to propose STIP-28: Enhance the OptionRule API to support
declarative
value constraints beyond the current presence-only checks.

Problem:
Today, optionRule() can only express "option X is
required/optional/exclusive/
conditional". It cannot express "port must be > 0", "start_ts < end_ts", or
"database name must be uppercase". This forces connector developers to
scatter
if/else validation in *Config.java — invisible to REST API, Web UI, CLI
--check,
and AI-assisted config generation.

After auditing all connector modules, I found 8 categories of validation
(numeric range, cross-field comparison, string format, string length, case
constraints, collection constraints, conditional value checks, mutual
exclusion)
that are currently implemented imperatively across dozens of connectors.

Proposed solution:
Extend the existing OptionRule + Condition system with a ConditionOperator
enum
(30 operators) and new Builder overloads, so these constraints become
declarative,
machine-readable, and automatically enforced by ConfigValidator across all
engines.

Full analysis and design:
https://github.com/apache/seatunnel/issues/10976

Reference implementation:
https://github.com/apache/seatunnel/pull/10977

I plan to formalize this as STIP-28 once I get initial feedback.
Any thoughts or concerns are welcome.

Best regards,
Zhiwei Niu

Reply via email to