isExplainableInner reports whether `node` is a shape that EXPLAIN can legitimately wrap (SELECT family or DML). DDL inside EXPLAIN is rejected: Doris only supports EXPLAIN on query and DML statements.
(node ast.Node)
| 81 | // legitimately wrap (SELECT family or DML). DDL inside EXPLAIN is rejected: |
| 82 | // Doris only supports EXPLAIN on query and DML statements. |
| 83 | func isExplainableInner(node ast.Node) bool { |
| 84 | switch node.(type) { |
| 85 | case *ast.SelectStmt, *ast.SetOpStmt: |
| 86 | return true |
| 87 | case *ast.InsertStmt, *ast.UpdateStmt, *ast.DeleteStmt, |
| 88 | *ast.MergeStmt, *ast.TruncateTableStmt: |
| 89 | return true |
| 90 | } |
| 91 | return false |
| 92 | } |