odps-sdk/odps-sdk-core/src/main/java/com/aliyun/odps/tunnel/hasher/DefaultHashFactory.java [75:197]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    return (int) (l);
  }

  /**
   * tinyint type hash
   */
  private static class TinyIntHasher implements OdpsHasher<Byte> {

    @Override
    public int hash(Byte val) {
      if (val == null) {
        return 0;
      }
      return basicLongHasher(val.longValue());
    }
  }


  /**
   * smallint type hash
   */
  private static class SmallIntHasher implements OdpsHasher<Short> {

    @Override
    public int hash(Short val) {
      if (val == null) {
        return 0;
      }
      return basicLongHasher(val.longValue());
    }
  }


  /**
   * Integer type hash
   */
  private static class IntHasher implements OdpsHasher<Integer> {

    @Override
    public int hash(Integer val) {
      if (val == null) {
        return 0;
      }
      return basicLongHasher(val.longValue());
    }
  }

  /**
   * Bigint type hash
   */
  private static class BigintHasher implements OdpsHasher<Long> {

    @Override
    public int hash(Long val) {
      if (val == null) {
        return 0;
      }
      return basicLongHasher(val.longValue());
    }
  }

  /**
   * Float type hash
   */
  private static class FloatHasher implements OdpsHasher<Float> {

    @Override
    public int hash(Float val) {
      if (val == null) {
        return 0;
      }
      return basicLongHasher((long) Float.floatToIntBits(val));
    }
  }

  /**
   * Double type hash
   */
  private static class DoubleHasher implements OdpsHasher<Double> {

    @Override
    public int hash(Double val) {
      if (val == null) {
        return 0;
      }
      return basicLongHasher(Double.doubleToLongBits(val));
    }
  }

  /**
   * Boolean type hash
   */
  private static class BooleanHasher implements OdpsHasher<Boolean> {

    @Override
    public int hash(Boolean val) {
      if (val == null) {
        return 0;
      }
      //it's magic number
      if (val) {
        return 0x172ba9c7;
      } else {
        return -0x3a59cb12;
      }
    }
  }

  /**
   * String type hash
   */
  private static class StringHasher implements OdpsHasher<String> {

    private static final Charset UTF8 = Charset.forName("UTF8");

    @Override
    public int hash(String val) {
      if (val == null) {
        return 0;
      }

      byte[] chars = val.getBytes(UTF8);
      int hashVal = 0;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



odps-sdk/odps-sdk-core/src/main/java/com/aliyun/odps/tunnel/hasher/LegacyHashFactory.java [63:185]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    return (int) (l);
  }

  /**
   * tinyint type hash
   */
  private static class TinyIntHasher implements OdpsHasher<Byte> {

    @Override
    public int hash(Byte val) {
      if (val == null) {
        return 0;
      }
      return basicLongHasher(val.longValue());
    }
  }


  /**
   * smallint type hash
   */
  private static class SmallIntHasher implements OdpsHasher<Short> {

    @Override
    public int hash(Short val) {
      if (val == null) {
        return 0;
      }
      return basicLongHasher(val.longValue());
    }
  }


  /**
   * Integer type hash
   */
  private static class IntHasher implements OdpsHasher<Integer> {

    @Override
    public int hash(Integer val) {
      if (val == null) {
        return 0;
      }
      return basicLongHasher(val.longValue());
    }
  }

  /**
   * Bigint type hash
   */
  private static class BigintHasher implements OdpsHasher<Long> {

    @Override
    public int hash(Long val) {
      if (val == null) {
        return 0;
      }
      return basicLongHasher(val.longValue());
    }
  }

  /**
   * Float type hash
   */
  private static class FloatHasher implements OdpsHasher<Float> {

    @Override
    public int hash(Float val) {
      if (val == null) {
        return 0;
      }
      return basicLongHasher((long) Float.floatToIntBits(val));
    }
  }

  /**
   * Double type hash
   */
  private static class DoubleHasher implements OdpsHasher<Double> {

    @Override
    public int hash(Double val) {
      if (val == null) {
        return 0;
      }
      return basicLongHasher(Double.doubleToLongBits(val));
    }
  }

  /**
   * Boolean type hash
   */
  private static class BooleanHasher implements OdpsHasher<Boolean> {

    @Override
    public int hash(Boolean val) {
      if (val == null) {
        return 0;
      }
      //it's magic number
      if (val) {
        return 0x172ba9c7;
      } else {
        return -0x3a59cb12;
      }
    }
  }

  /**
   * String type hash
   */
  private static class StringHasher implements OdpsHasher<String> {

    private static final Charset UTF8 = Charset.forName("UTF8");

    @Override
    public int hash(String val) {
      if (val == null) {
        return 0;
      }

      byte[] chars = val.getBytes(UTF8);
      int hashVal = 0;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



