public static TYPE valueOf(Object lower, Object upper) {
      if (lower instanceof Integer || upper instanceof Integer) {
        return INT;
      } else if (lower instanceof Long || upper instanceof Long) {
        return LONG;
      } else if (lower instanceof Float || upper instanceof Float) {
        return FLOAT;
      }
      throw new IllegalArgumentException("invalid range from " + lower + " to " + upper);
    }
validate value for a ConfVar, return non-null string for fail message
common/src/java/org/apache/hadoop/hive/conf/Validator.java