Skip to content

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

Open
yujun777 wants to merge 2 commits into
apache:branch-4.1from
yujun777:pick-pr-63403-branch-4.1
Open

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

Conversation

@yujun777

@yujun777 yujun777 commented Jul 6, 2026

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

yujun777 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@yujun777

yujun777 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants