Skip to content

Commit

Permalink
executor/metrics: distinguish desc a table and explain a SQL on metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Shuaipeng Yu <jackysp@gmail.com>
  • Loading branch information
jackysp committed Jan 13, 2022
1 parent 0a3bcc6 commit c871db2
Showing 1 changed file with 7 additions and 1 deletion.
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

0 comments on commit c871db2

Please sign in to comment.