improved sql parser. bug fixed for issue #2446

This commit is contained in:
wenshao
2018-04-01 13:39:38 +08:00
parent d6812d290e
commit 3df15cbaed
19 changed files with 547 additions and 117 deletions
@@ -34,8 +34,6 @@ public class OdpsSelectQueryBlock extends SQLSelectQueryBlock {
private SQLOrderBy orderBy;
protected List<SQLHint> hints;
public OdpsSelectQueryBlock(){
dbType = JdbcConstants.ODPS;
@@ -72,21 +70,6 @@ public class OdpsSelectQueryBlock extends SQLSelectQueryBlock {
return true;
}
public List<SQLHint> getHintsDirect() {
return hints;
}
public List<SQLHint> getHints() {
if (hints == null) {
hints = new ArrayList<SQLHint>(2);
}
return hints;
}
public void setHints(List<SQLHint> hints) {
this.hints = hints;
}
@Override
protected void accept0(SQLASTVisitor visitor) {
if (visitor instanceof OdpsASTVisitor) {
@@ -455,7 +455,7 @@ public class OdpsOutputVisitor extends SQLASTOutputVisitor implements OdpsASTVis
print0(ucase ? "SELECT " : "select ");
List<SQLHint> hints = x.getHintsDirect();
List<SQLCommentHint> hints = x.getHintsDirect();
if (hints != null) {
printAndAccept(hints, " ");
print(' ');