improved oracle sql parser.

This commit is contained in:
wenshao
2017-09-21 22:05:27 +08:00
parent f006fbecb8
commit 7268c17624
33 changed files with 1273 additions and 21 deletions
@@ -588,6 +588,10 @@ public class SQLTransformUtils {
dataType = new SQLDataTypeImpl(SQLDataType.Constants.TIMESTAMP, 0);
} else if (nameHash == FnvHash.Constants.TIMESTAMP) {
x.setName(SQLDataType.Constants.TIMESTAMP);
if (x.isWithLocalTimeZone()) {
x.setWithLocalTimeZone(false);
x.setWithTimeZone(null);
}
dataType = x;
} else if (nameHash == FnvHash.Constants.DATETIME) {
int len = -1;
@@ -669,6 +673,13 @@ public class SQLTransformUtils {
}
}
if (nameHashCode64 == FnvHash.Constants.SYSTIMESTAMP) {
SQLMethodInvokeExpr xx = x.clone();
xx.setMethodName("CURRENT_TIMESTAMP");
xx.setParent(x.getParent());
return xx;
}
return x;
}