Jefffrey commented on code in PR #20098:
URL: https://github.com/apache/datafusion/pull/20098#discussion_r2832354449


##########
datafusion/sqllogictest/test_files/information_schema.slt:
##########
@@ -812,6 +812,49 @@ select is_deterministic from information_schema.routines 
where routine_name = 'n
 ----
 false
 
+# Test window function return types in information_schema.routines
+# Before PR #20079, window functions would show NULL for data_type
+# This test verifies that UDWF return types are correctly reported
+
+query TTT
+select routine_name, data_type, function_type from information_schema.routines 
where routine_name = 'row_number';
+----
+row_number NULL WINDOW
+
+query TTT
+select routine_name, data_type, function_type from information_schema.routines 
where routine_name = 'rank';
+----
+rank NULL WINDOW
+
+query TTT
+select routine_name, data_type, function_type from information_schema.routines 
where routine_name = 'dense_rank';
+----
+dense_rank NULL WINDOW
+
+query TTT
+select routine_name, data_type, function_type from information_schema.routines 
where routine_name = 'lag';
+----
+lag NULL WINDOW
+
+query TTT
+select routine_name, data_type, function_type from information_schema.routines 
where routine_name = 'lead';
+----
+lead NULL WINDOW
+
+# Test that window functions return types match their actual behavior
+# row_number, rank, dense_rank all return NULL (no return type in signature)
+# lag and lead return types depend on their input (shown as NULL in generic 
signature)
+query TTTB
+select routine_name, data_type, function_type, is_deterministic
+from information_schema.routines
+where function_type = 'WINDOW'
+  and (routine_name = 'row_number' OR routine_name = 'rank' OR routine_name = 
'dense_rank')
+order by routine_name;
+----
+dense_rank NULL WINDOW true
+rank NULL WINDOW true
+row_number NULL WINDOW true

Review Comment:
   I don't understand what this test is testing thats different from the above 
queries?



##########
datafusion/sqllogictest/test_files/information_schema.slt:
##########
@@ -812,6 +812,49 @@ select is_deterministic from information_schema.routines 
where routine_name = 'n
 ----
 false
 
+# Test window function return types in information_schema.routines
+# Before PR #20079, window functions would show NULL for data_type
+# This test verifies that UDWF return types are correctly reported

Review Comment:
   ```suggestion
   ```
   
   Unnecessary information



-- 
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