Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

executor/metrics: distinguish desc a table and explain a SQL on metrics #30948

Merged
merged 4 commits into from
Jan 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
executor/metrics: distinguish desc a table and explain a SQL on metrics
Signed-off-by: Shuaipeng Yu <jackysp@gmail.com>
  • Loading branch information
jackysp committed Jan 13, 2022
commit c871db2c7c1a81e5321fd88f1e006c29b3277ac8
8 changes: 7 additions & 1 deletion executor/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,13 @@ func GetStmtLabel(stmtNode ast.StmtNode) string {
}
return "DropTable"
case *ast.ExplainStmt:
return "Explain"
if _, ok := x.Stmt.(*ast.ShowStmt); ok {
return "DescTable"
}
if x.Analyze {
return "ExplainAnalyzeSQL"
}
return "ExplainSQL"
case *ast.InsertStmt:
if x.IsReplace {
return "Replace"
Expand Down