- 
                Notifications
    You must be signed in to change notification settings 
- Fork 666
feat: Add RESET to the base dialect #2078 #2079
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
base: main
Are you sure you want to change the base?
feat: Add RESET to the base dialect #2078 #2079
Conversation
        
          
                src/dialect/mod.rs
              
                Outdated
          
        
      |  | ||
| /// Returns true if the dialect supports the `RESET` statement | ||
| /// for resetting session variables. | ||
| /// | ||
| /// ```sql | ||
| /// RESET configuration_parameter; | ||
| /// RESET ALL; | ||
| /// ``` | ||
| fn supports_reset(&self) -> bool { | ||
| false | ||
| } | 
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.
| /// Returns true if the dialect supports the `RESET` statement | |
| /// for resetting session variables. | |
| /// | |
| /// ```sql | |
| /// RESET configuration_parameter; | |
| /// RESET ALL; | |
| /// ``` | |
| fn supports_reset(&self) -> bool { | |
| false | |
| } | 
I think we can let the parser always accept the statement if it shows up, without considering the dialect
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.
Can do. I think out of the list of dialects only ANSI, sqlite, and Hive lack support (Hive SQL doesn't take a parameter).
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.
I updated the ticket to include exactly which dialects support RESET, and its a bit touch and go. Right now this seems reasonable (in that it accepts a very reasonable use, though not strictly correct for all dialects).
This adds support for the RESET statement to the base dialect.