add method OracleUtils.isBultinTable

This commit is contained in:
wenshao
2017-06-19 20:32:50 +08:00
parent 49628d6a59
commit dd72eef325
3 changed files with 1377 additions and 0 deletions
@@ -183,4 +183,24 @@ public class OracleUtils {
return functions.contains(function_lower);
}
private static Set<String> builtinTables;
public static boolean isBuiltinTable(String table) {
if (table == null) {
return false;
}
String table_lower = table.toLowerCase();
Set<String> tables = builtinTables;
if (tables == null) {
tables = new HashSet<String>();
Utils.loadFromFile("META-INF/druid/parser/oracle/builtin_tables", tables);
builtinTables = tables;
}
return tables.contains(table_lower);
}
}