[fix](load-profile) fix show load profile return emoty result (#19125)

Fix 2 bugs of show load profile:

For broker load, the second level should be the sub task' id.
show load profile stmt should be forwarded to master FE to execute.
This commit is contained in:
Mingyu Chen
2023-04-27 11:05:00 +08:00
committed by GitHub
parent 908518915d
commit ab8adea39f
2 changed files with 6 additions and 1 deletions

View File

@ -150,5 +150,10 @@ public class ShowLoadProfileStmt extends ShowStmt {
return null;
}
}
@Override
public RedirectStatus getRedirectStatus() {
return RedirectStatus.FORWARD_NO_SYNC;
}
}

View File

@ -2160,7 +2160,7 @@ public class ShowExecutor {
}
case FRAGMENTS: {
ProfileTreeNode treeRoot = ProfileManager.getInstance().getFragmentProfileTree(showStmt.getJobId(),
showStmt.getJobId());
showStmt.getTaskId());
if (treeRoot == null) {
throw new AnalysisException("Failed to get fragment tree for load: " + showStmt.getJobId());
}