doris
doris copied to clipboard
[fix](planner)Fix the concurrency issue caused by Expr setting member variables
What problem does this PR solve?
When multiple threads operate on the same member variable (e.g., disableTableName in org.apache.doris.analysis.Expr#toSqlWithoutTbl) of the same Expr (e.g., org.apache.doris.catalog.Column#getDefineExpr), the resulting toSql output may not match the expected value due to concurrency issues.
Add an overloaded toSql method in Expr, remove related member variables, and make toSqlWithoutTbl directly call the overloaded toSql method
Issue Number: close #xxx
Related PR: #xxx
Problem Summary: Fix the concurrency issue caused by Expr setting member variables
Release note
Fix the concurrency issue caused by Expr setting member variables
Check List (For Author)
-
Test
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [x] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason
-
Behavior changed:
- [x] No.
- [ ] Yes.
-
Does this need documentation?
- [x] No.
- [ ] Yes.
Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label