@@ -225,7 +225,7 @@ mod tests {
225225 WindowFunction :: AggregateFunction ( AggregateFunction :: Avg )
226226 ) ;
227227 assert_eq ! (
228- WindowFunction :: from_str( "cum_dist " ) ?,
228+ WindowFunction :: from_str( "cume_dist " ) ?,
229229 WindowFunction :: BuiltInWindowFunction ( BuiltInWindowFunction :: CumeDist )
230230 ) ;
231231 assert_eq ! (
@@ -253,6 +253,9 @@ mod tests {
253253 let observed = return_type ( & fun, & [ DataType :: Utf8 ] ) ?;
254254 assert_eq ! ( DataType :: UInt64 , observed) ;
255255
256+ let observed = return_type ( & fun, & [ DataType :: UInt64 ] ) ?;
257+ assert_eq ! ( DataType :: UInt64 , observed) ;
258+
256259 Ok ( ( ) )
257260 }
258261
@@ -262,6 +265,9 @@ mod tests {
262265 let observed = return_type ( & fun, & [ DataType :: Utf8 ] ) ?;
263266 assert_eq ! ( DataType :: Utf8 , observed) ;
264267
268+ let observed = return_type ( & fun, & [ DataType :: UInt64 ] ) ?;
269+ assert_eq ! ( DataType :: UInt64 , observed) ;
270+
265271 Ok ( ( ) )
266272 }
267273
@@ -271,6 +277,9 @@ mod tests {
271277 let observed = return_type ( & fun, & [ DataType :: Utf8 ] ) ?;
272278 assert_eq ! ( DataType :: Utf8 , observed) ;
273279
280+ let observed = return_type ( & fun, & [ DataType :: Float64 ] ) ?;
281+ assert_eq ! ( DataType :: Float64 , observed) ;
282+
274283 Ok ( ( ) )
275284 }
276285
@@ -280,6 +289,9 @@ mod tests {
280289 let observed = return_type ( & fun, & [ DataType :: Utf8 ] ) ?;
281290 assert_eq ! ( DataType :: Utf8 , observed) ;
282291
292+ let observed = return_type ( & fun, & [ DataType :: Float64 ] ) ?;
293+ assert_eq ! ( DataType :: Float64 , observed) ;
294+
283295 Ok ( ( ) )
284296 }
285297
@@ -289,22 +301,28 @@ mod tests {
289301 let observed = return_type ( & fun, & [ DataType :: Utf8 ] ) ?;
290302 assert_eq ! ( DataType :: Utf8 , observed) ;
291303
304+ let observed = return_type ( & fun, & [ DataType :: Float64 ] ) ?;
305+ assert_eq ! ( DataType :: Float64 , observed) ;
306+
292307 Ok ( ( ) )
293308 }
294309
295310 #[ test]
296311 fn test_nth_value_return_type ( ) -> Result < ( ) > {
297312 let fun = WindowFunction :: from_str ( "nth_value" ) ?;
298- let observed = return_type ( & fun, & [ DataType :: Utf8 ] ) ?;
313+ let observed = return_type ( & fun, & [ DataType :: Utf8 , DataType :: UInt64 ] ) ?;
299314 assert_eq ! ( DataType :: Utf8 , observed) ;
300315
316+ let observed = return_type ( & fun, & [ DataType :: Float64 , DataType :: UInt64 ] ) ?;
317+ assert_eq ! ( DataType :: Float64 , observed) ;
318+
301319 Ok ( ( ) )
302320 }
303321
304322 #[ test]
305323 fn test_cume_dist_return_type ( ) -> Result < ( ) > {
306324 let fun = WindowFunction :: from_str ( "cume_dist" ) ?;
307- let observed = return_type ( & fun, & [ DataType :: Float64 ] ) ?;
325+ let observed = return_type ( & fun, & [ ] ) ?;
308326 assert_eq ! ( DataType :: Float64 , observed) ;
309327
310328 Ok ( ( ) )
0 commit comments