improved sql parser.

This commit is contained in:
wenshao
2017-08-03 10:41:23 +08:00
parent 9df6894d83
commit b0c38aef68
70 changed files with 1091 additions and 109 deletions
@@ -200,7 +200,7 @@ public class Utils {
if (className == null) {
return null;
}
try {
return Class.forName(className);
} catch (ClassNotFoundException e) {
@@ -236,7 +236,7 @@ public class Utils {
/**
* murmur hash 2.0, The murmur hash is a relatively fast hash function from http://murmurhash.googlepages.com/ for
* platforms with efficient multiplication.
*
*
* @author Viliam Holub
*/
public static long murmurhash2_64(final byte[] data, int length, int seed) {
@@ -250,13 +250,13 @@ public class Utils {
for (int i = 0; i < length8; i++) {
final int i8 = i * 8;
long k = ((long) data[i8 + 0] & 0xff) //
+ (((long) data[i8 + 1] & 0xff) << 8) //
+ (((long) data[i8 + 2] & 0xff) << 16)//
+ (((long) data[i8 + 3] & 0xff) << 24) //
+ (((long) data[i8 + 4] & 0xff) << 32)//
+ (((long) data[i8 + 5] & 0xff) << 40)//
+ (((long) data[i8 + 6] & 0xff) << 48) //
+ (((long) data[i8 + 7] & 0xff) << 56);
+ (((long) data[i8 + 1] & 0xff) << 8) //
+ (((long) data[i8 + 2] & 0xff) << 16)//
+ (((long) data[i8 + 3] & 0xff) << 24) //
+ (((long) data[i8 + 4] & 0xff) << 32)//
+ (((long) data[i8 + 5] & 0xff) << 40)//
+ (((long) data[i8 + 6] & 0xff) << 48) //
+ (((long) data[i8 + 7] & 0xff) << 56);
k *= m;
k ^= k >>> r;