Skip to content

Commit

Permalink
[fix](planner) FunctionCallExpr clone should be deep copy
Browse files Browse the repository at this point in the history
should deep copy all attribute of FunctionCallExpr in copy constructor
  • Loading branch information
morrySnow committed Nov 27, 2024
1 parent bce9b69 commit 3d91035
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ public FunctionCallExpr(FunctionCallExpr e, FunctionParams params) {

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,9 @@ public static FunctionName read(DataInput in) throws IOException {
public int hashCode() {
return 31 * Objects.hashCode(db) + Objects.hashCode(fn);
}

@Override
public FunctionName clone() {
return new FunctionName(db, fn);
}
}

0 comments on commit 3d91035

Please sign in to comment.