@@ -159,6 +159,7 @@ pub struct UserDefinedFunction {
159159 pub description : String ,
160160 pub definition : UDFDefinition ,
161161 pub created_on : DateTime < Utc > ,
162+ pub update_on : DateTime < Utc > ,
162163}
163164
164165impl UserDefinedFunction {
@@ -168,14 +169,16 @@ impl UserDefinedFunction {
168169 definition : & str ,
169170 description : & str ,
170171 ) -> Self {
172+ let now = Utc :: now ( ) ;
171173 Self {
172174 name : name. to_string ( ) ,
173175 description : description. to_string ( ) ,
174176 definition : UDFDefinition :: LambdaUDF ( LambdaUDF {
175177 parameters,
176178 definition : definition. to_string ( ) ,
177179 } ) ,
178- created_on : Utc :: now ( ) ,
180+ created_on : now,
181+ update_on : now,
179182 }
180183 }
181184
@@ -191,6 +194,7 @@ impl UserDefinedFunction {
191194 description : & str ,
192195 immutable : Option < bool > ,
193196 ) -> Self {
197+ let now = Utc :: now ( ) ;
194198 Self {
195199 name : name. to_string ( ) ,
196200 description : description. to_string ( ) ,
@@ -204,7 +208,8 @@ impl UserDefinedFunction {
204208 return_type,
205209 immutable,
206210 } ) ,
207- created_on : Utc :: now ( ) ,
211+ created_on : now,
212+ update_on : now,
208213 }
209214 }
210215
@@ -219,6 +224,7 @@ impl UserDefinedFunction {
219224 description : & str ,
220225 immutable : Option < bool > ,
221226 ) -> Self {
227+ let now = Utc :: now ( ) ;
222228 Self {
223229 name : name. to_string ( ) ,
224230 description : description. to_string ( ) ,
@@ -233,7 +239,8 @@ impl UserDefinedFunction {
233239 packages : vec ! [ ] ,
234240 immutable,
235241 } ) ,
236- created_on : Utc :: now ( ) ,
242+ created_on : now,
243+ update_on : now,
237244 }
238245 }
239246
0 commit comments