Skip to content

Commit

Permalink
Optimise AST rewriting
Browse files Browse the repository at this point in the history
Merges RewriteAST and Normalizer so both actions can be done together

Signed-off-by: Andres Taylor <[email protected]>
  • Loading branch information
systay committed Jan 24, 2025
1 parent a6c2896 commit 91d26e0
Show file tree
Hide file tree
Showing 10 changed files with 309 additions and 242 deletions.
2 changes: 1 addition & 1 deletion go/vt/sqlparser/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func ASTToStatementType(stmt Statement) StatementType {
// CanNormalize takes Statement and returns if the statement can be normalized.
func CanNormalize(stmt Statement) bool {
switch stmt.(type) {
case *Select, *Union, *Insert, *Update, *Delete, *Set, *CallProc, *Stream, *VExplainStmt: // TODO: we could merge this logic into ASTrewriter
case *Select, *Union, *Insert, *Update, *Delete, *Set, *CallProc, *Stream, *VExplainStmt, *Show: // TODO: we could merge this logic into ASTrewriter
return true
}
return false
Expand Down
Loading

0 comments on commit 91d26e0

Please sign in to comment.