drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amansinha100 <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-4237: Implement murmur3 for HashHelper
Date Tue, 19 Apr 2016 20:22:06 GMT
Github user amansinha100 commented on a diff in the pull request:

    https://github.com/apache/drill/pull/485#discussion_r60303921
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/HashHelper.java
---
    @@ -60,4 +60,45 @@ public static int hash(ByteBuffer buf, int seed) {
         return h;
       }
     
    +  public static int hash32(int val, long seed) {
    +    double converted = val;
    +    return hash32(converted, seed);
    +  }
    +  public static int hash32(long val, long seed) {
    +    double converted = val;
    +    return hash32(converted, seed);
    +  }
    +  public static int hash32(float val, long seed){
    +    double converted = val;
    +    return hash32(converted, seed);
    +  }
    +
    +
    +  public static long hash64(float val, long seed){
    +    double converted = val;
    +    return hash64(converted, seed);
    +  }
    +  public static long hash64(long val, long seed){
    +    double converted = val;
    +    return hash64(converted, seed);
    +  }
    +
    +  public static long hash64(double val, long seed){
    +    return MurmurHash3.hash64(val, (int)seed);
    +  }
    +
    +  public static long hash64(long start, long end, DrillBuf buffer, long seed){
    +    return MurmurHash3.hash64(start, end, buffer, (int)seed);
    +  }
    +
    +  public static int hash32(double val, long seed) {
    +    //return com.google.common.hash.Hashing.murmur3_128().hashLong(Double.doubleToLongBits(val)).asInt();
    --- End diff --
    
    Remove this line


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message