Repository navigation
test: add slt coverage for issues found during sqlparser upgrade #27922
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
Merged
+586
−0
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b6ede42
test: add slt coverage for keywords used as unquoted identifiers
alamb 8a0f3d4
Add session keyword and unquoted end cases
alamb 15c8ede
Move session keyword cases to functions.slt and end cases to errors.slt
alamb 3376444
test: use SPDX license header for keyword identifier tests
blaginin 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
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 |
|---|---|---|
|
|
@@ -1857,3 +1857,69 @@ Infinity | |
|
|
||
| statement ok | ||
| drop table t1 | ||
|
|
||
| # Session information keywords such as `current_user`, with and without | ||
| # an argument list | ||
|
|
||
| query error DataFusion error: Schema error: No field named current_user\. | ||
| SELECT current_user; | ||
|
|
||
| query error DataFusion error: SQL error: ParserError\("Expected: end of statement, found: \( at Line: 1, Column: 20"\) | ||
| SELECT current_user(); | ||
|
Contributor
Author
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. These functions may change behavior so let's document what is happening |
||
|
|
||
| query error DataFusion error: SQL error: ParserError\("Expected: end of statement, found: \( at Line: 1, Column: 20"\) | ||
| SELECT current_user(1); | ||
|
|
||
| query error DataFusion error: Schema error: No field named session_user\. | ||
| SELECT session_user; | ||
|
|
||
| query error DataFusion error: SQL error: ParserError\("Expected: end of statement, found: \( at Line: 1, Column: 20"\) | ||
| SELECT session_user(); | ||
|
|
||
| query error DataFusion error: SQL error: ParserError\("Expected: end of statement, found: \( at Line: 1, Column: 20"\) | ||
| SELECT session_user(1); | ||
|
|
||
| query error DataFusion error: Schema error: No field named system_user\. | ||
| SELECT system_user; | ||
|
|
||
| query error DataFusion error: Error during planning: Invalid function 'system_user'\. | ||
| SELECT system_user(); | ||
|
|
||
| query error DataFusion error: Error during planning: Invalid function 'system_user'\. | ||
| SELECT system_user(1); | ||
|
|
||
| query error DataFusion error: Schema error: No field named user\. | ||
| SELECT user; | ||
|
|
||
| query error DataFusion error: SQL error: ParserError\("Expected: end of statement, found: \( at Line: 1, Column: 12"\) | ||
| SELECT user(); | ||
|
|
||
| query error DataFusion error: SQL error: ParserError\("Expected: end of statement, found: \( at Line: 1, Column: 12"\) | ||
| SELECT user(1); | ||
|
|
||
| query error DataFusion error: Schema error: No field named current_role\. | ||
| SELECT current_role; | ||
|
|
||
| query error DataFusion error: Error during planning: Invalid function 'current_role'\. | ||
| SELECT current_role(); | ||
|
|
||
| query error DataFusion error: Error during planning: Invalid function 'current_role'\. | ||
| SELECT current_role(1); | ||
|
|
||
| query error DataFusion error: Schema error: No field named current_catalog\. | ||
| SELECT current_catalog; | ||
|
|
||
| query error DataFusion error: SQL error: ParserError\("Expected: end of statement, found: \( at Line: 1, Column: 23"\) | ||
| SELECT current_catalog(); | ||
|
|
||
| query error DataFusion error: SQL error: ParserError\("Expected: end of statement, found: \( at Line: 1, Column: 23"\) | ||
| SELECT current_catalog(1); | ||
|
|
||
| query error DataFusion error: Schema error: No field named current_schema\. | ||
| SELECT current_schema; | ||
|
|
||
| query error DataFusion error: Error during planning: Invalid function 'current_schema'\. | ||
| SELECT current_schema(); | ||
|
|
||
| query error DataFusion error: Error during planning: Invalid function 'current_schema'\. | ||
| SELECT current_schema(1); | ||
Oops, something went wrong.
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.
agent got confused about this syntax so let's keep it explcit