Skip to content
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

Open
wants to merge 3 commits into
base: 2.x
Choose a base branch
from

Conversation

Siritejagaddameedi
Copy link

@Siritejagaddameedi Siritejagaddameedi commented Jan 28, 2025

Description

Add SQLQueryUtils support for Vacuum queries

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

  1. SQLQueryUtils didn't support for Vacuum queries

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

Copy link
Collaborator

@ykmr1224 ykmr1224 left a 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.

@ykmr1224 ykmr1224 added enhancement New feature or request backport 2.x labels Jan 28, 2025
@ykmr1224
Copy link
Collaborator

Build failed due to style check.

Comment on lines 318 to 342
@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);
}

Copy link
Collaborator

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?

Copy link
Author

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.

Siri Teja Gaddameedi added 3 commits January 30, 2025 09:07
Signed-off-by: Siri Teja Gaddameedi <[email protected]>
Signed-off-by: Siri Teja Gaddameedi <[email protected]>
Copy link
Collaborator

@ykmr1224 ykmr1224 left a 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.

@Siritejagaddameedi Siritejagaddameedi changed the base branch from 2.x to main January 31, 2025 04:18
@Siritejagaddameedi Siritejagaddameedi changed the base branch from main to 2.x January 31, 2025 04:18
@Siritejagaddameedi Siritejagaddameedi changed the base branch from 2.x to main February 6, 2025 05:35
@Siritejagaddameedi Siritejagaddameedi changed the base branch from main to 2.x February 6, 2025 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants