format/src/main/java/com/github/sadikovi/riff/stats/Statistics.java
/**
   * Return new statistics instance for specified type. If type is unsupported, no-op statistics
   * are returned.
   * @param dataType SQL type for the value
   * @return statistics instance
   */
Return new statistics instance for specified type. If type is unsupported, no-op statistics
are returned.
@param dataType SQL type for the value
@return statistics instance
Return new statistics instance for specified type . If type is unsupported no - op statistics are returned . @param dataType SQL type for the value @return statistics instance
public static Statistics sqlTypeToStatistics(DataType dataType) {
    if (dataType instanceof IntegerType) {
      return new IntStatistics();
    } else if (dataType instanceof LongType) {
      return new LongStatistics();
    } else if (dataType instanceof StringType) {
      return new UTF8Statistics();
    } else if (dataType instanceof DateType) {
      return new DateStatistics();
    } else if (dataType instanceof TimestampType) {
      return new TimestampStatistics();
    } else if (dataType instanceof BooleanType) {
      return new BooleanStatistics();
    } else if (dataType instanceof ShortType) {
      return new ShortStatistics();
    } else if (dataType instanceof ByteType) {
      return new ByteStatistics();
    } else {
      throw new UnsupportedOperationException("No statistics for data type: " + dataType);
    }
  }
public static Statistics sqlTypeToStatistics ( DataType dataType ) { if ( dataType instanceof IntegerType ) { return new IntStatistics ( ) ; } else if ( dataType instanceof LongType ) { return new LongStatistics ( ) ; } else if ( dataType instanceof StringType ) { return new UTF8Statistics ( ) ; } else if ( dataType instanceof DateType ) { return new DateStatistics ( ) ; } else if ( dataType instanceof TimestampType ) { return new TimestampStatistics ( ) ; } else if ( dataType instanceof BooleanType ) { return new BooleanStatistics ( ) ; } else if ( dataType instanceof ShortType ) { return new ShortStatistics ( ) ; } else if ( dataType instanceof ByteType ) { return new ByteStatistics ( ) ; } else { throw new UnsupportedOperationException ( "No statistics for data type: " + dataType ) ; } }
Return new statistics instance for specified type.
Return new statistics instance for specified type .