mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser.
This commit is contained in:
@@ -36,7 +36,19 @@ public final class FnvHash {
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static long fnv1a_64(char[] chars) {
|
||||
if (chars == null) {
|
||||
return 0;
|
||||
}
|
||||
long hash = BASIC;
|
||||
for (int i = 0; i < chars.length; ++i) {
|
||||
char c = chars[i];
|
||||
hash ^= c;
|
||||
hash *= PRIME;
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* lower & normalized & fnv_1a_64
|
||||
|
||||
Reference in New Issue
Block a user