alamb commented on code in PR #12045:
URL: https://github.com/apache/datafusion/pull/12045#discussion_r1720950615


##########
datafusion/sqllogictest/test_files/window.slt:
##########
@@ -4879,3 +4879,21 @@ SELECT lead(column2, 1.1) OVER (order by column1) FROM t;
 
 query error DataFusion error: Execution error: Expected an integer value
 SELECT nth_value(column2, 1.1) OVER (order by column1) FROM t;
+
+statement ok
+drop table t;
+
+statement ok
+create table t(a int, b int) as values (1, 2)
+
+query II
+select a, row_number() over (order by b) as rn from t;
+----
+1 1
+
+# RowNumber expect 0 args.
+query error

Review Comment:
   Wild -- I double checked and you are right
   
   ```sql
   DataFusion CLI v41.0.0
   > create table t(a int, b int) as values (1, 2);
   0 row(s) fetched.
   Elapsed 0.015 seconds.
   
   > select a, row_number() over (order by b) as rn from t;
   +---+----+
   | a | rn |
   +---+----+
   | 1 | 1  |
   +---+----+
   1 row(s) fetched.
   Elapsed 0.006 seconds.
   
   > select a, row_number(a) over (order by b) as rn from t;
   +---+----+
   | a | rn |
   +---+----+
   | 1 | 1  |
   +---+----+
   1 row(s) fetched.
   Elapsed 0.002 seconds.
   ```



##########
datafusion/expr/src/type_coercion/functions.rs:
##########
@@ -95,6 +94,32 @@ pub fn data_types_with_aggregate_udf(
     try_coerce_types(valid_types, current_types, &signature.type_signature)
 }
 
+pub fn data_types_with_window_udf(

Review Comment:
   Can you please add documentation for this (`pub`) function? I think we could 
basically follow the pattern of the docs on `data_types_with_scalar_udf` above



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to