nzw921rx opened a new pull request, #11882:
URL: https://github.com/apache/seatunnel/pull/11882
### Purpose of this pull request
`Expression` currently acts as a wrapper around `Condition` for composing
conditional option rules. However, `Condition` already provides the same
composition capability through `and()` and `or()`, so keeping both models
introduces unnecessary API duplication.
This PR deprecates `Expression` in favor of using `Condition` directly.
The changes include:
* Mark `Expression` as deprecated and document the recommended migration
path.
* Deprecate `ConditionalRequiredOptions.of(Expression, List)`.
* Add `ConditionalRequiredOptions.of(Condition, List)` as the preferred API.
* Keep the existing `Expression`-based API temporarily for source
compatibility with downstream extensions.
This change does not remove any existing API or alter condition evaluation
semantics. `Expression` can be removed in a future API cleanup after an
appropriate compatibility window.
### Does this PR introduce *any* user-facing change?
Yes.
This is a public API deprecation. Existing code using `Expression` continues
to work, but new code should use `Condition` directly.
For example, instead of:
```java
ConditionalRequiredOptions.of(
Expression.of(condition),
requiredOptions);
```
new code can use:
```java
ConditionalRequiredOptions.of(
condition,
requiredOptions);
```
There is no runtime behavior change in this PR.
### How was this patch tested?
No new tests were added because this change only introduces API deprecation
metadata, documentation, and a delegating overload. The existing condition
evaluation behavior is unchanged.
### Check list
* [x] No new Jar binary package is added.
* [x] No documentation update is required.
* [x] No incompatible change is introduced because the existing API is
retained.
* [x] This change does not involve connector code.
--
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]