Skip to content

Commit

Permalink
[fix](regression) add exception when can not find profile with specif…
Browse files Browse the repository at this point in the history
…ic tag (#44530)

Related PR: #43103 

Problem Summary:
When getting profile of old planner, we would find that it can not get
profile for some statements, which is not expected to check results of
nereids planner
also revert show trash command, cause of implementation problem
  • Loading branch information
LiBinfeng-01 authored Nov 25, 2024
1 parent a89926a commit 9f5b49f
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 113 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@
import org.apache.doris.nereids.DorisParser.ShowStorageEnginesContext;
import org.apache.doris.nereids.DorisParser.ShowTableIdContext;
import org.apache.doris.nereids.DorisParser.ShowTabletsBelongContext;
import org.apache.doris.nereids.DorisParser.ShowTrashContext;
import org.apache.doris.nereids.DorisParser.ShowTriggersContext;
import org.apache.doris.nereids.DorisParser.ShowVariablesContext;
import org.apache.doris.nereids.DorisParser.ShowViewContext;
Expand Down Expand Up @@ -495,7 +494,6 @@
import org.apache.doris.nereids.trees.plans.commands.ShowStorageEnginesCommand;
import org.apache.doris.nereids.trees.plans.commands.ShowTableIdCommand;
import org.apache.doris.nereids.trees.plans.commands.ShowTabletsBelongCommand;
import org.apache.doris.nereids.trees.plans.commands.ShowTrashCommand;
import org.apache.doris.nereids.trees.plans.commands.ShowTriggersCommand;
import org.apache.doris.nereids.trees.plans.commands.ShowVariablesCommand;
import org.apache.doris.nereids.trees.plans.commands.ShowViewCommand;
Expand Down Expand Up @@ -4127,11 +4125,6 @@ public SetDefaultStorageVaultCommand visitSetDefaultStorageVault(SetDefaultStora
return new SetDefaultStorageVaultCommand(stripQuotes(ctx.identifier().getText()));
}

@Override
public LogicalPlan visitShowTrash(ShowTrashContext ctx) {
return new ShowTrashCommand();
}

@Override
public Object visitRefreshCatalog(RefreshCatalogContext ctx) {
if (ctx.name != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ public enum PlanType {
SHOW_ROLE_COMMAND,
SHOW_STORAGE_ENGINES_COMMAND,
SHOW_TABLE_ID_COMMAND,
SHOW_TRASH_COMMAND,
SHOW_TRIGGERS_COMMAND,
SHOW_VARIABLES_COMMAND,
SHOW_AUTHORS_COMMAND,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
import org.apache.doris.nereids.trees.plans.commands.ShowStorageEnginesCommand;
import org.apache.doris.nereids.trees.plans.commands.ShowTableIdCommand;
import org.apache.doris.nereids.trees.plans.commands.ShowTabletsBelongCommand;
import org.apache.doris.nereids.trees.plans.commands.ShowTrashCommand;
import org.apache.doris.nereids.trees.plans.commands.ShowTriggersCommand;
import org.apache.doris.nereids.trees.plans.commands.ShowVariablesCommand;
import org.apache.doris.nereids.trees.plans.commands.ShowViewCommand;
Expand Down Expand Up @@ -419,10 +418,6 @@ default R visitShowTableIdCommand(ShowTableIdCommand showTableIdCommand, C conte
return visitCommand(showTableIdCommand, context);
}

default R visitShowTrashCommand(ShowTrashCommand showTrashCommand, C context) {
return visitCommand(showTrashCommand, context);
}

default R visitSyncCommand(SyncCommand syncCommand, C context) {
return visitCommand(syncCommand, context);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ class ProfileAction implements SuiteAction {

def jsonSlurper = new JsonSlurper()
List profileData = jsonSlurper.parseText(body).data.rows
def canFindProfile = false;
for (final def profileItem in profileData) {
if (profileItem["Sql Statement"].toString().contains(tag)) {
canFindProfile = true
def profileId = profileItem["Profile ID"].toString()

def profileCli = new HttpCliAction(context)
Expand Down Expand Up @@ -113,6 +115,9 @@ class ProfileAction implements SuiteAction {
break
}
}
if (!canFindProfile) {
throw new IllegalStateException("Missing profile with tag: " + tag)
}
}
httpCli.run()
} finally {
Expand Down

This file was deleted.

0 comments on commit 9f5b49f

Please sign in to comment.