diff --git a/core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSubqueryTableSource.java b/core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSubqueryTableSource.java index 310b233451..3fe79e3ba6 100644 --- a/core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSubqueryTableSource.java +++ b/core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSubqueryTableSource.java @@ -66,6 +66,9 @@ protected void accept0(SQLASTVisitor visitor) { if (select != null) { select.accept(visitor); } + if (pivot != null) { + pivot.accept(visitor); + } } visitor.endVisit(this); } diff --git a/core/src/main/java/com/alibaba/druid/sql/dialect/odps/visitor/OdpsOutputVisitor.java b/core/src/main/java/com/alibaba/druid/sql/dialect/odps/visitor/OdpsOutputVisitor.java index 759ab7c954..0014c7a243 100644 --- a/core/src/main/java/com/alibaba/druid/sql/dialect/odps/visitor/OdpsOutputVisitor.java +++ b/core/src/main/java/com/alibaba/druid/sql/dialect/odps/visitor/OdpsOutputVisitor.java @@ -585,7 +585,7 @@ public boolean visit(OdpsReadStatement x) { protected void printMethodOwner(SQLExpr owner) { owner.accept(this); - if (owner instanceof SQLMethodInvokeExpr) { + if (owner instanceof SQLMethodInvokeExpr || owner instanceof SQLPropertyExpr) { print('.'); } else { print(':');