Skip to content

branch-4.1: [refactor](fe) Refine volatile expression handling #63403 - #65255

Merged
yiguolei merged 2 commits into
apache:branch-4.1from
yujun777:pick-pr-63403-branch-4.1
Jul 7, 2026
Merged

branch-4.1: [refactor](fe) Refine volatile expression handling #63403#65255
yiguolei merged 2 commits into
apache:branch-4.1from
yujun777:pick-pr-63403-branch-4.1

Conversation

@yujun777

Copy link
Copy Markdown
Contributor

cherry-pick: #63403

Related PR: apache#62698
Problem Summary:
PR apache#62698 introduced the UDF volatility property and added
`VolatileExpression` / `VolatileIdentity` so volatile UDF calls can
carry per-call identity and avoid unsafe optimizer rewrites.
This PR is a follow-up refactoring for that change. It removes
duplicated unique identity state from `UniqueFunction`, keeps
`VolatileIdentity` as the single identity holder, moves
volatile-expression helper methods into `ExpressionTrait`, and expands
the former `AddProjectForUniqueFunction` rewrite to operate on volatile
expressions rather than only unique functions.
@yujun777
yujun777 requested a review from yiguolei as a code ownerJuly 6, 2026 08:07
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@yujun777

Copy link
Copy Markdown
ContributorAuthor

run buildall

@yujun777

Copy link
Copy Markdown
ContributorAuthor

run buildall

@yujun777

Copy link
Copy Markdown
ContributorAuthor

run feut

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 97.22% (35/36) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 88.89% (32/36) 🎉
Increment coverage report
Complete coverage report

@yujun777

Copy link
Copy Markdown
ContributorAuthor

run p0

1 similar comment
@yujun777

Copy link
Copy Markdown
ContributorAuthor

run p0

@yiguolei

Copy link
Copy Markdown
Contributor

skip buildall

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Jul 7, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@yiguolei
yiguolei merged commit 9159e2a into apache:branch-4.1Jul 7, 2026
31 of 34 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@yujun777@hello-stephen@yiguolei