Skip to content

Commit

Permalink
Removed methods from SQLQueryValidationVisitor due to grammar file ch…
Browse files Browse the repository at this point in the history
…ange

Signed-off-by: Tomoyuki Morita <[email protected]>
  • Loading branch information
ykmr1224 committed Oct 4, 2024
1 parent 12f2801 commit 7e897d3
Showing 1 changed file with 0 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.AddTableColumnsContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.AddTablePartitionContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.AlterClusterByContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.AlterTableAlterColumnContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.AlterViewQueryContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.AlterViewSchemaBindingContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.AnalyzeContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.AnalyzeTablesContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.CacheTableContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.ClearCacheContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.ClusterBySpecContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.CreateNamespaceContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.CreateTableContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.CreateTableLikeContext;
Expand Down Expand Up @@ -81,7 +78,6 @@
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.TransformClauseContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.TruncateTableContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.UncacheTableContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.UnsetNamespacePropertiesContext;
import org.opensearch.sql.spark.antlr.parser.SqlBaseParserBaseVisitor;

/** This visitor validate grammar using GrammarElementValidator */
Expand All @@ -101,12 +97,6 @@ public Void visitSetNamespaceProperties(SetNamespacePropertiesContext ctx) {
return super.visitSetNamespaceProperties(ctx);
}

@Override
public Void visitUnsetNamespaceProperties(UnsetNamespacePropertiesContext ctx) {
validateAllowed(GrammarElement.ALTER_NAMESPACE);
return super.visitUnsetNamespaceProperties(ctx);
}

@Override
public Void visitAddTableColumns(AddTableColumnsContext ctx) {
validateAllowed(GrammarElement.ALTER_NAMESPACE);
Expand Down Expand Up @@ -173,12 +163,6 @@ public Void visitRecoverPartitions(RecoverPartitionsContext ctx) {
return super.visitRecoverPartitions(ctx);
}

@Override
public Void visitAlterClusterBy(AlterClusterByContext ctx) {
validateAllowed(GrammarElement.ALTER_NAMESPACE);
return super.visitAlterClusterBy(ctx);
}

@Override
public Void visitSetNamespaceLocation(SetNamespaceLocationContext ctx) {
validateAllowed(GrammarElement.ALTER_NAMESPACE);
Expand All @@ -191,12 +175,6 @@ public Void visitAlterViewQuery(AlterViewQueryContext ctx) {
return super.visitAlterViewQuery(ctx);
}

@Override
public Void visitAlterViewSchemaBinding(AlterViewSchemaBindingContext ctx) {
validateAllowed(GrammarElement.ALTER_VIEW);
return super.visitAlterViewSchemaBinding(ctx);
}

@Override
public Void visitRenameTable(RenameTableContext ctx) {
if (ctx.VIEW() != null) {
Expand Down Expand Up @@ -337,12 +315,6 @@ public Void visitCtes(CtesContext ctx) {
return super.visitCtes(ctx);
}

@Override
public Void visitClusterBySpec(ClusterBySpecContext ctx) {
validateAllowed(GrammarElement.CLUSTER_BY);
return super.visitClusterBySpec(ctx);
}

@Override
public Void visitQueryOrganization(QueryOrganizationContext ctx) {
if (ctx.CLUSTER() != null) {
Expand Down

0 comments on commit 7e897d3

Please sign in to comment.