druid SQL Visitor missing print0 PARTITION for SQLAlterTableReOrganizePartition

dsekswqp  于 4个月前  发布在  Druid
关注(0)|答案(1)|浏览(65)

The visit(SQLAlterTableReOrganizePartition x) miss the print0 for PARTITION

tzxcd3kk

tzxcd3kk1#

suggest fix as follow:

diff --git a/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java b/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
index 3cadd09..9939d5f 100644
--- a/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
+++ b/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
@@ -4784,7 +4784,7 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
 
     @Override
     public boolean visit(SQLAlterTableReOrganizePartition x) {
-        print0(ucase ? "REORGANIZE " : "reorganize ");
+        print0(ucase ? "REORGANIZE PARTITION " : "reorganize partition ");
 
         printAndAccept(x.getNames(), ", ");

相关问题