-
Notifications
You must be signed in to change notification settings - Fork 144
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
Add SQLQuery Utils support for Vaccum queries #3269
base: 2.x
Are you sure you want to change the base?
Add SQLQuery Utils support for Vaccum queries #3269
Conversation
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.
Please add DCO, and unit tests.
Build failed due to style check. |
@Override | ||
public Void visitVacuumCoveringIndexStatement( | ||
FlintSparkSqlExtensionsParser.VacuumCoveringIndexStatementContext ctx) { | ||
indexQueryDetailsBuilder.indexQueryActionType(IndexQueryActionType.VACUUM); | ||
indexQueryDetailsBuilder.indexType(FlintIndexType.COVERING); | ||
return super.visitVacuumCoveringIndexStatement(ctx); | ||
} | ||
|
||
@Override | ||
public Void visitVacuumSkippingIndexStatement( | ||
FlintSparkSqlExtensionsParser.VacuumSkippingIndexStatementContext ctx) { | ||
indexQueryDetailsBuilder.indexQueryActionType(IndexQueryActionType.VACUUM); | ||
indexQueryDetailsBuilder.indexType(FlintIndexType.SKIPPING); | ||
return super.visitVacuumSkippingIndexStatement(ctx); | ||
} | ||
|
||
@Override | ||
public Void visitVacuumMaterializedViewStatement( | ||
FlintSparkSqlExtensionsParser.VacuumMaterializedViewStatementContext ctx) { | ||
indexQueryDetailsBuilder.indexQueryActionType(IndexQueryActionType.VACUUM); | ||
indexQueryDetailsBuilder.indexType(FlintIndexType.MATERIALIZED_VIEW); | ||
indexQueryDetailsBuilder.mvName(ctx.mvName.getText()); | ||
return super.visitVacuumMaterializedViewStatement(ctx); | ||
} | ||
|
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.
what's the use case for adding Vaccum in async-query-core?
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.
Whenever we call SQLQueryUtils with vacuum query, it will fail to parse the query.
Signed-off-by: Siri Teja Gaddameedi <[email protected]>
Signed-off-by: Siri Teja Gaddameedi <[email protected]>
Signed-off-by: Siri Teja Gaddameedi <[email protected]>
d2ac2fa
to
f8642a5
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.
I think you want to make this change against main
branch instead of 2.x
and we'll backport to 2.x
once merged.
Description
Add SQLQueryUtils support for Vacuum queries
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.