Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
LiBinfeng-01 committed Nov 4, 2024
1 parent a1babf8 commit 8b015d0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ statementBase
| constraintStatement #constraintStatementAlias
| supportedDropStatement #supportedDropStatementAlias
| supportedSetStatement #supportedSetStatementAlias
| supportedUnsetVariableStatement #supportedUnsetVariableStatementAlias
| supportedUnsetDefaultStorageVaultStatement #supportedUnsetDefaultStorageVaultStatementAlias
| supportedUnsetStatement #supportedUnsetStatementAlias
| unsupportedStatement #unsupported
;

Expand Down Expand Up @@ -840,12 +839,9 @@ isolationLevel
: ISOLATION LEVEL ((READ UNCOMMITTED) | (READ COMMITTED) | (REPEATABLE READ) | (SERIALIZABLE))
;

supportedUnsetVariableStatement
supportedUnsetStatement
: UNSET (GLOBAL | SESSION | LOCAL)? VARIABLE (ALL | identifier)
;

supportedUnsetDefaultStorageVaultStatement
: UNSET DEFAULT STORAGE VAULT
| UNSET DEFAULT STORAGE VAULT
;

unsupportedUseStatement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@
import org.apache.doris.nereids.DorisParser.StructLiteralContext;
import org.apache.doris.nereids.DorisParser.SubqueryContext;
import org.apache.doris.nereids.DorisParser.SubqueryExpressionContext;
import org.apache.doris.nereids.DorisParser.SupportedUnsetDefaultStorageVaultStatementContext;
import org.apache.doris.nereids.DorisParser.SupportedUnsetVariableStatementContext;
import org.apache.doris.nereids.DorisParser.SupportedUnsetStatementContext;
import org.apache.doris.nereids.DorisParser.SystemVariableContext;
import org.apache.doris.nereids.DorisParser.TableAliasContext;
import org.apache.doris.nereids.DorisParser.TableNameContext;
Expand Down Expand Up @@ -3828,7 +3827,10 @@ public Object visitUnsupported(UnsupportedContext ctx) {
}

@Override
public LogicalPlan visitSupportedUnsetVariableStatement(SupportedUnsetVariableStatementContext ctx) {
public LogicalPlan visitSupportedUnsetStatement(SupportedUnsetStatementContext ctx) {
if (ctx.DEFAULT() != null && ctx.STORAGE() != null && ctx.VAULT() != null) {
return new UnsetDefaultStorageVaultCommand();
}
SetType type = SetType.DEFAULT;
if (ctx.GLOBAL() != null) {
type = SetType.GLOBAL;
Expand All @@ -3843,12 +3845,6 @@ public LogicalPlan visitSupportedUnsetVariableStatement(SupportedUnsetVariableSt
throw new AnalysisException("Should add 'ALL' or variable name");
}

@Override
public LogicalPlan visitSupportedUnsetDefaultStorageVaultStatement(
SupportedUnsetDefaultStorageVaultStatementContext ctx) {
return new UnsetDefaultStorageVaultCommand();
}

@Override
public LogicalPlan visitCreateTableLike(CreateTableLikeContext ctx) {
List<String> nameParts = visitMultipartIdentifier(ctx.name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class UnsetVariableCommand extends Command implements Forward {

private SetType setType;

// variables to restore
// variable to restore
private String variable = null;

private boolean applyToAll = false;
Expand Down

0 comments on commit 8b015d0

Please sign in to comment.