Skip to content

Commit

Permalink
fix(table permission): partition name shouldn't display in the table …
Browse files Browse the repository at this point in the history
…permission check window (#3402)

* The partition table name shouldn't display in the sql check window

* adapt the sql of create partition table

* adapt for sql of creating partition table in table permission check window

* remove partition  name in the table permission
  • Loading branch information
zijiacj authored Sep 14, 2024
1 parent c0858d1 commit 3262223
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import com.oceanbase.tools.sqlparser.obmysql.OBParser.Database_factorContext;
import com.oceanbase.tools.sqlparser.obmysql.OBParser.Dot_relation_factorContext;
import com.oceanbase.tools.sqlparser.obmysql.OBParser.Normal_relation_factorContext;
import com.oceanbase.tools.sqlparser.obmysql.OBParser.Partition_optionContext;
import com.oceanbase.tools.sqlparser.obmysql.OBParser.Relation_factorContext;
import com.oceanbase.tools.sqlparser.obmysql.OBParser.Relation_factor_with_starContext;
import com.oceanbase.tools.sqlparser.obmysql.OBParser.Relation_nameContext;
Expand Down Expand Up @@ -198,11 +199,19 @@ private static class OBMySQLRelationFactorVisitor extends OBParserBaseVisitor<Re

private final Set<DBSchemaIdentity> identities = new HashSet<>();

@Override
public RelationFactor visitPartition_option(Partition_optionContext ctx) {
return null;
}

@Override
public RelationFactor visitAlter_table_action(Alter_table_actionContext ctx) {
if (ctx.RENAME() != null) {
return null;
}
if (ctx.alter_partition_option() != null) {
return null;
}
return this.visitChildren(ctx);
}

Expand Down Expand Up @@ -337,11 +346,19 @@ private static class OBOracleRelationFactorVisitor

private final Set<DBSchemaIdentity> identities = new HashSet<>();

@Override
public RelationFactor visitPartition_option(OBParser.Partition_optionContext ctx) {
return null;
}

@Override
public RelationFactor visitAlter_table_action(OBParser.Alter_table_actionContext ctx) {
if (ctx.RENAME() != null) {
return null;
}
if (ctx.alter_partition_option() != null) {
return null;
}
return this.visitChildren(ctx);
}

Expand Down

0 comments on commit 3262223

Please sign in to comment.