You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "yoavcloud (via GitHub)" <gi...@apache.org> on 2025/08/19 14:41:39 UTC
[PR] Add support for VACUUM in Redshift [datafusion-sqlparser-rs]
yoavcloud opened a new pull request, #2005:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2005
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Add support for VACUUM in Redshift [datafusion-sqlparser-rs]
Posted by "iffyio (via GitHub)" <gi...@apache.org>.
iffyio merged PR #2005:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2005
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Add support for VACUUM in Redshift [datafusion-sqlparser-rs]
Posted by "iffyio (via GitHub)" <gi...@apache.org>.
iffyio commented on code in PR #2005:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2005#discussion_r2287943062
##########
src/ast/mod.rs:
##########
@@ -10597,6 +10605,50 @@ impl fmt::Display for InitializeKind {
}
}
+/// Re-sorts rows and reclaims space in either a specified table or all tables in the current database
+///
+/// '''sql
+/// VACUUM [ FULL | SORT ONLY | DELETE ONLY | REINDEX | RECLUSTER ] [ \[ table_name \] [ TO threshold PERCENT ] \[ BOOST \] ]
+/// '''
Review Comment:
```suggestion
/// ```sql
/// VACUUM [ FULL | SORT ONLY | DELETE ONLY | REINDEX | RECLUSTER ] [ \[ table_name \] [ TO threshold PERCENT ] \[ BOOST \] ]
/// ```
```
##########
src/parser/mod.rs:
##########
@@ -649,6 +649,7 @@ impl<'a> Parser<'a> {
self.prev_token();
self.parse_export_data()
}
+ Keyword::VACUUM => self.parse_vacuum(),
Review Comment:
```suggestion
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:
##########
@@ -16874,6 +16875,38 @@ impl<'a> Parser<'a> {
}))
}
+ fn parse_vacuum(&mut self) -> Result<Statement, ParserError> {
+ let full = self.parse_keyword(Keyword::FULL);
+ let sort_only = self.parse_keywords(&[Keyword::SORT, Keyword::ONLY]);
+ 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) {
Review Comment:
```suggestion
let (table_name, threshold, boost) = match self.parse_object_name(false)? {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org