-
Couldn't load subscription status.
- Fork 176
Add SQLQuery Utils support for Vaccum queries #3269
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
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.
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.
f8642a5 to
e86f4b6
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.
Thanks for the change! Let's fix the DCO and add the necessary test cases, for example https://github.com/opensearch-project/sql/pull/2985/files#diff-4aba5e85641e1ff025d49ef65ad0eb29a5db4bb00d4a3d3f90ccf55a925b5a8f
Signed-off-by: Siri Teja Gaddameedi <sirigadd@amazon.com> Add UTs Signed-off-by: Siri Teja Gaddameedi <sirigadd@amazon.com> Fix build Signed-off-by: Siri Teja Gaddameedi <sirigadd@amazon.com> Fix code style Signed-off-by: Siri Teja Gaddameedi <sirigadd@amazon.com>
f3496e7 to
532e90a
Compare
Add UTs Fix build Fix code style Signed-off-by: Siri Teja Gaddameedi <sirigadd@amazon.com> Co-authored-by: Siri Teja Gaddameedi <sirigadd@amazon.com> (cherry picked from commit e23a61d) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Add UTs Fix build Fix code style (cherry picked from commit e23a61d) Signed-off-by: Siri Teja Gaddameedi <sirigadd@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Siri Teja Gaddameedi <sirigadd@amazon.com>
Add UTs Fix build Fix code style Signed-off-by: Siri Teja Gaddameedi <sirigadd@amazon.com> Co-authored-by: Siri Teja Gaddameedi <sirigadd@amazon.com> Signed-off-by: xinyual <xinyual@amazon.com>
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.