bug fixed for sql parser.

This commit is contained in:
wenshao
2017-08-02 09:33:24 +08:00
parent 10de17ba8a
commit 9df6894d83
12 changed files with 151 additions and 132 deletions
@@ -442,6 +442,25 @@ public class Utils {
return hashCode;
}
public static long fnv_32_lower(String key) {
long hashCode = 0x811c9dc5;
for (int i = 0; i < key.length(); ++i) {
char ch = key.charAt(i);
if (ch == '_' || ch == '-') {
continue;
}
if (ch >= 'A' && ch <= 'Z') {
ch = (char) (ch + 32);
}
hashCode ^= ch;
hashCode *= 0x01000193;
}
return hashCode;
}
public static void loadFromFile(String path, Set<String> set) {
InputStream is = null;
BufferedReader reader = null;