bug fixed for db2 sql parser.

This commit is contained in:
wenshao
2018-04-07 21:20:07 +08:00
parent 01a2978f45
commit 542e132272
4 changed files with 139 additions and 0 deletions
@@ -25,6 +25,7 @@ public interface DB2Object extends SQLObject {
interface Constants {
long CURRENT_DATE = FnvHash.fnv1a_64_lower("CURRENT DATE");
long CURRENT_DATE2 = FnvHash.fnv1a_64_lower("CURRENT_DATE");
long CURRENT_TIME = FnvHash.fnv1a_64_lower("CURRENT TIME");
long CURRENT_SCHEMA = FnvHash.fnv1a_64_lower("CURRENT SCHEMA");
}
@@ -61,6 +61,7 @@ public class DB2SchemaStatVisitor extends SchemaStatVisitor implements DB2ASTVis
protected boolean isPseudoColumn(long hash64) {
return hash64 == DB2Object.Constants.CURRENT_DATE
|| hash64 == DB2Object.Constants.CURRENT_DATE2
|| hash64 == DB2Object.Constants.CURRENT_TIME
|| hash64 == DB2Object.Constants.CURRENT_SCHEMA;
}