improved odps sql formatter

This commit is contained in:
shaojin.wensj
2015-07-28 22:24:07 +08:00
parent 29d0889d86
commit 87f3f8144b
6 changed files with 61 additions and 21 deletions
@@ -1283,7 +1283,7 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Printab
print(",");
} else {
println();
print(JoinType.toString(x.getJoinType()));
printJoinType(x.getJoinType());
}
print(" ");
x.getRight().accept(this);
@@ -1311,6 +1311,10 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Printab
return false;
}
protected void printJoinType(JoinType joinType) {
print(JoinType.toString(joinType));
}
@Override
public boolean visit(ValuesClause x) {
print("(");