Skip to content

Conversation

yoavcloud
Copy link
Contributor

No description provided.

Comment on lines +10610 to +10619
/// '''sql
/// VACUUM [ FULL | SORT ONLY | DELETE ONLY | REINDEX | RECLUSTER ] [ \[ table_name \] [ TO threshold PERCENT ] \[ BOOST \] ]
/// '''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// '''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 \] ]
/// ```

self.prev_token();
self.parse_export_data()
}
Keyword::VACUUM => self.parse_vacuum(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let (table_name, threshold, boost) = match self.parse_object_name(false) {
let (table_name, threshold, boost) = match self.parse_object_name(false)? {

Copy link
Contributor Author

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.

Copy link
Contributor

@iffyio iffyio left a 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

@iffyio iffyio merged commit e9eee00 into apache:main Aug 21, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants