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

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


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

commit cf0b4c95af89bd4ffadc53c09aff2e9e78a3e542
Author: morrySnow <zhangwen...@selectdb.com>
AuthorDate: Thu Nov 28 10:42:55 2024 +0800

    [fix](planner) FunctionCallExpr clone should be deep copy (#44678)
---
 .../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 53bb2ba95ac..51e18d750f2 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
@@ -432,7 +432,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 b6feddb7d25..d0e695f6660 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
@@ -183,4 +183,9 @@ public class FunctionName {
     public int hashCode() {
         return 31 * Objects.hashCode(db) + Objects.hashCode(fn);
     }
+
+    @Override
+    public FunctionName clone() {
+        return new FunctionName(db, fn);
+    }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to