You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "nzw921rx (via GitHub)" <gi...@apache.org> on 2026/08/19 12:26:27 UTC

[PR] [Improve] [API] Deprecate Expression in favor of Condition [seatunnel]

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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Improve] [API] Deprecate Expression in favor of Condition [seatunnel]

Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #11882:
URL: https://github.com/apache/seatunnel/pull/11882#issuecomment-5564702413

   Thanks @davidzollo for the approval.
   
   Nothing has changed since my last pass: the head is still `6a2d7d5`, `Build` reported `success` on that SHA (run `33034743311`), and the diff between `c9d936d2f2` and `6a2d7d54f8` on the two files this PR touches is still empty. The two items I noted earlier remain non-blocking follow-ups.
   
   Good to merge from here. I'll take another look right away if a new commit lands.
   
   <!-- streview-comment:868 -->


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Improve] [API] Deprecate Expression in favor of Condition [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11882:
URL: https://github.com/apache/seatunnel/pull/11882#issuecomment-5617151959

   Thanks @dybyte for the additional +1. Nothing has changed on the code side: head is still `6a2d7d5`, the exact commit I already reviewed and approved, `Build` is green on that SHA, and `reviewDecision` shows `APPROVED`. `mergeStateStatus` remains `BLOCKED` only because the actual merge still needs a maintainer with write permission to press the button — my own review rights here are comment-only. No further action needed from the review side; will re-review immediately if a new commit lands.
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Improve] [API] Deprecate Expression in favor of Condition [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11882:
URL: https://github.com/apache/seatunnel/pull/11882#issuecomment-5593938200

   Agreed on all counts — same head, `Build` green, nothing new to re-review, and `reviewDecision` now shows `APPROVED` on my side too. `BLOCKED` here is just the branch-protection merge step waiting on a maintainer with write permission, same as you said. Nothing further from me either; will jump back in if a new commit lands.
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Improve] [API] Deprecate Expression in favor of Condition [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11882:
URL: https://github.com/apache/seatunnel/pull/11882#issuecomment-5645317824

   Quick status update: @davidzollo's write-level `APPROVED` review has now landed (2026-09-12, on this same head `6a2d7d5`), which is exactly the missing piece I kept flagging in my last several passes — `reviewDecision` shows `APPROVED` now. Nothing on the code side has changed since my last review, `Build` is still green on `6a2d7d5`, and no new blockers exist from my side.
   
   `mergeable_state` is still `blocked`, but that looks like it's just waiting on the requested reviewer (@zhangshenghang) rather than anything code-related. Nothing further needed from me — happy to take another look immediately if a new commit lands.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Improve] [API] Deprecate Expression in favor of Condition [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11882:
URL: https://github.com/apache/seatunnel/pull/11882#issuecomment-5546855850

   Thanks for the re-request, @nzw921rx. I've re-checked and there's nothing new to review: the head is still `6a2d7d5`, the exact commit I already approved, and `Build` is green on that SHA (`success`, run confirmed). My "Ready to merge" from the prior round still stands.
   
   As noted before, I only have comment-only review rights on this repository, so the formal approval/merge still needs a maintainer with write-level review permission. I'll take another look immediately if a new commit lands.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Improve] [API] Deprecate Expression in favor of Condition [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11882:
URL: https://github.com/apache/seatunnel/pull/11882#issuecomment-5480647757

   CI record update: the `Build` run I flagged as still in progress at approval time has since completed successfully (`feature/deprecate-expression` @ `6a2d7d5`, fork run `nzw921rx/seatunnel#33034743311`, attempt 2, conclusion `success`). This confirms the green result I asked to see before merging — no new failures, and the branch remains `mergeable=true` with no conflicts against `dev`.
   
   No other blockers remain on my side. As noted in my approval, since I only have comment-only review rights on this repository, a maintainer with write-level review permission still needs to complete the formal approval/merge.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Improve] [API] Deprecate Expression in favor of Condition [seatunnel]

Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte merged PR #11882:
URL: https://github.com/apache/seatunnel/pull/11882


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Improve] [API] Deprecate Expression in favor of Condition [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11882:
URL: https://github.com/apache/seatunnel/pull/11882#issuecomment-5577177538

   Thanks @SEZ9 — confirmed on my end too. Head is still `6a2d7d5`, `Build` is green, and there's no new commit or discussion that changes anything from my prior passes.
   
   With @davidzollo's write-level `APPROVED` review now in place, the merge-readiness gap I kept flagging (my own review here is comment-only, so it couldn't satisfy branch protection by itself) is resolved. No further action needed from me — this is ready to merge whenever a maintainer picks it up.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Improve] [API] Deprecate Expression in favor of Condition [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11882:
URL: https://github.com/apache/seatunnel/pull/11882#issuecomment-5558558639

   Thanks @davidzollo — this is exactly the write-level approval I flagged as still needed in my last few passes (I only have comment-only review rights here, so my own `APPROVED` couldn't satisfy branch protection on its own).
   
   No changes to the code since my last review (`6a2d7d5`, unchanged) and no blockers remain on my side — the two open items (no internal `Expression` call-site migration/`@SuppressWarnings`, and the PR description's minor misattribution of `of(Condition, List)` as newly added) are both non-blocking follow-up material, not correctness or compatibility issues. Good to merge from here.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Improve] [API] Deprecate Expression in favor of Condition [seatunnel]

Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #11882:
URL: https://github.com/apache/seatunnel/pull/11882#issuecomment-5578291456

   Quick status check: the head is still `6a2d7d5`, the exact commit I approved, `Build` is green on that SHA, and no new commit or discussion has landed since my last pass, so there is nothing new to re-review.
   
   With @davidzollo's `APPROVED` review in place, the write-level approval I had been flagging is covered. Since my own review rights here are comment-only, the actual merge still needs to be done by a maintainer with write permission — nothing further is needed from my side, and I'll take another look right away if a new commit lands.
   
   <!-- streview-comment:891 -->


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Improve] [API] Deprecate Expression in favor of Condition [seatunnel]

Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #11882:
URL: https://github.com/apache/seatunnel/pull/11882#issuecomment-5650771031

   Thanks @davidzollo and @dybyte for the approvals. Nothing has changed on the code side: the deprecation of `Expression` and `RequiredOption.ConditionalRequiredOptions.of(Expression, List)` is still additive, annotation-plus-Javadoc only, with no signature or behavior changes, and my diff of `6a2d7d5` against `6595169` (`git diff 6a2d7d54f82 6595169 -- Expression.java RequiredOption.java`) was empty.
   
   My review rights here are comment-only, so the actual merge still needs a maintainer with write permission. Nothing further needed from me; I'll take another look right away if a new commit lands.
   
   <!-- streview-comment:1012 -->


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org