-
Notifications
You must be signed in to change notification settings - Fork 2.1k
test: add sqllogictest coverage for UDWF return types in information_… #20098
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
karuppuchamysuresh
wants to merge
6
commits into
apache:main
from
karuppuchamysuresh:test/information-schema-udwf-coverage-20090
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5db21e8
test: add sqllogictest coverage for UDWF return types in information_…
karuppuchamysuresh faae189
Merge branch 'main' into test/information-schema-udwf-coverage-20090
karuppuchamysuresh afc7dec
Merge branch 'main' into test/information-schema-udwf-coverage-20090
karuppuchamysuresh ac31e56
test: Fix window function return type expectations in information_sch…
karuppuchamysuresh ed8110f
Merge branch 'main' into test/information-schema-udwf-coverage-20090
karuppuchamysuresh b8e6b80
Merge branch 'main' into test/information-schema-udwf-coverage-20090
karuppuchamysuresh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Comment on lines
+844
to
+856
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand what this test is testing thats different from the above queries? |
||
|
|
||
| # test every function type are included in the result | ||
| query TTTITTTTBI | ||
| select * from information_schema.parameters where specific_name = 'date_trunc' OR specific_name = 'string_agg' OR specific_name = 'rank' ORDER BY specific_name, rid, data_type; | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary information