bug fixed for sql parser

This commit is contained in:
wenshao
2013-02-02 20:33:57 +08:00
parent 84f30ff2ed
commit c0c2892024
@@ -1292,12 +1292,14 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter {
@Override
public boolean visit(SQLOver x) {
print("OVER (");
printAndAccept(x.getPartitionBy(), ", ");
print(")");
if (x.getPartitionBy().size() > 0) {
printAndAccept(x.getPartitionBy(), ", ");
print(' ');
}
if (x.getOrderBy() != null) {
print(" ");
x.getOrderBy().accept(this);
}
print(")");
return false;
}