-
Notifications
You must be signed in to change notification settings - Fork 632
Add support for VACUUM in Redshift #2005
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
Conversation
719765a
to
777d03a
Compare
/// '''sql | ||
/// VACUUM [ FULL | SORT ONLY | DELETE ONLY | REINDEX | RECLUSTER ] [ \[ table_name \] [ TO threshold PERCENT ] \[ BOOST \] ] | ||
/// ''' |
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.
/// '''sql | |
/// VACUUM [ FULL | SORT ONLY | DELETE ONLY | REINDEX | RECLUSTER ] [ \[ table_name \] [ TO threshold PERCENT ] \[ BOOST \] ] | |
/// ''' | |
/// ```sql | |
/// VACUUM [ FULL | SORT ONLY | DELETE ONLY | REINDEX | RECLUSTER ] [ \[ table_name \] [ TO threshold PERCENT ] \[ BOOST \] ] | |
/// ``` |
src/parser/mod.rs
Outdated
@@ -649,6 +649,7 @@ impl<'a> Parser<'a> { | |||
self.prev_token(); | |||
self.parse_export_data() | |||
} | |||
Keyword::VACUUM => self.parse_vacuum(), |
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.
Keyword::VACUUM => self.parse_vacuum(), | |
Keyword::VACUUM => { | |
self.prev_token(); | |
self.parse_vacuum() | |
} |
Thinking so that we can make parse_vacuum
standalone to be able to parse a full VACUUM
statement
src/parser/mod.rs
Outdated
let delete_only = self.parse_keywords(&[Keyword::DELETE, Keyword::ONLY]); | ||
let reindex = self.parse_keyword(Keyword::REINDEX); | ||
let recluster = self.parse_keyword(Keyword::RECLUSTER); | ||
let (table_name, threshold, boost) = match self.parse_object_name(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.
let (table_name, threshold, boost) = match self.parse_object_name(false) { | |
let (table_name, threshold, boost) = match self.parse_object_name(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.
Good catch, my intention was to optionally parse an object_name. See latest commit.
777d03a
to
41af5d4
Compare
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.
LGTM! Thanks @yoavcloud!
cc @alamb
No description provided.