Skip to content

Commit

Permalink
Fix starrocks createTableStatement visitor issue
Browse files Browse the repository at this point in the history
  • Loading branch information
woyumen4597 authored and wenshao committed Nov 24, 2024
1 parent 33eb051 commit 7e34607
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.alibaba.druid.sql.ast.statement.SQLSelectOrderByItem;
import com.alibaba.druid.sql.dialect.starrocks.ast.StarRocksObject;
import com.alibaba.druid.sql.dialect.starrocks.visitor.StarRocksASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -61,9 +62,19 @@ public void setOrderBy(SQLOrderBy orderBy) {
this.orderBy = orderBy;
}

@Override
protected void accept0(SQLASTVisitor v) {
if (v instanceof StarRocksASTVisitor) {
accept0((StarRocksASTVisitor) v);
return;
}
super.accept0(v);
}

@Override
public void accept0(StarRocksASTVisitor v) {
if (v.visit(this)) {
super.acceptChild(v);
acceptChild(v, engine);
acceptChild(v, orderBy);
}
Expand Down

0 comments on commit 7e34607

Please sign in to comment.