File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ impl FromStr for WindowFunction {
4949 Ok ( WindowFunction :: BuiltInWindowFunction ( built_in_function) )
5050 } else {
5151 Err ( DataFusionError :: Plan ( format ! (
52- "There is no built-in function named {}" ,
52+ "There is no window function named {}" ,
5353 name
5454 ) ) )
5555 }
@@ -292,6 +292,15 @@ mod tests {
292292 Ok ( ( ) )
293293 }
294294
295+ #[ test]
296+ fn test_nth_value_return_type ( ) -> Result < ( ) > {
297+ let fun = WindowFunction :: from_str ( "nth_value" ) ?;
298+ let observed = return_type ( & fun, & [ DataType :: Utf8 ] ) ?;
299+ assert_eq ! ( DataType :: Utf8 , observed) ;
300+
301+ Ok ( ( ) )
302+ }
303+
295304 #[ test]
296305 fn test_cume_dist_return_type ( ) -> Result < ( ) > {
297306 let fun = WindowFunction :: from_str ( "cume_dist" ) ?;
Original file line number Diff line number Diff line change @@ -2746,7 +2746,7 @@ mod tests {
27462746 let sql = "SELECT order_id, MAX(delivered) OVER (order BY order_id) from orders" ;
27472747 let err = logical_plan ( sql) . expect_err ( "query should have failed" ) ;
27482748 assert_eq ! (
2749- "NotImplemented(\" Unsupported OVER clause (PARTITION BY order_id)\" )" ,
2749+ "NotImplemented(\" Unsupported OVER clause (ORDER BY order_id)\" )" ,
27502750 format!( "{:?}" , err)
27512751 ) ;
27522752 }
You can’t perform that action at this time.
0 commit comments