Skip to content

Commit f738e9c

Browse files
committed
fix.
1 parent e08fc08 commit f738e9c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sql/core/src/main/scala/org/apache/spark/sql/expressions/UserDefinedFunction.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ case class UserDefinedFunction protected[sql] (
9494
* @since 2.3.0
9595
*/
9696
def withName(name: String): this.type = {
97-
this._nameOption = Option(name)
98-
this
97+
val udf = copyAll()
98+
udf._nameOption = Option(name)
99+
udf
99100
}
100101

101102
/**

0 commit comments

Comments
 (0)