This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 6f868e4f1e5 branch-2.1: [fix](planner) FunctionCallExpr clone should 
be deep copy #44678 (#44711)
6f868e4f1e5 is described below

commit 6f868e4f1e54a1cd058dc307a374878dfd573682
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Nov 29 14:06:30 2024 +0800

    branch-2.1: [fix](planner) FunctionCallExpr clone should be deep copy 
#44678 (#44711)
    
    Cherry-picked from #44678
    
    Co-authored-by: morrySnow <[email protected]>
---
 .../src/main/java/org/apache/doris/analysis/FunctionCallExpr.java    | 2 +-
 fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionName.java | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java
index 88791504b8e..8d71bdc3557 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java
@@ -430,7 +430,7 @@ public class FunctionCallExpr extends Expr {
 
     protected FunctionCallExpr(FunctionCallExpr other) {
         super(other);
-        fnName = other.fnName;
+        fnName = other.fnName != null ? other.fnName.clone() : null;
         orderByElements = other.orderByElements;
         isAnalyticFnCall = other.isAnalyticFnCall;
         // aggOp = other.aggOp;
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionName.java 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionName.java
index cb243ef03e3..1b458fab756 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionName.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionName.java
@@ -193,4 +193,9 @@ public class FunctionName implements Writable {
     public int hashCode() {
         return 31 * Objects.hashCode(db) + Objects.hashCode(fn);
     }
+
+    @Override
+    public FunctionName clone() {
+        return new FunctionName(db, fn);
+    }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to