format/src/main/java/com/github/sadikovi/riff/column/ColumnFilter.java
/**
   * Select column filter for SQL data type.
   * @param dataType Spark SQL data type
   * @param numItems expected number of items
   * @return column filter
   */
Select column filter for SQL data type.
@param dataType Spark SQL data type
@param numItems expected number of items
@return column filter
Select column filter for SQL data type . @param dataType Spark SQL data type @param numItems expected number of items @return column filter
public static ColumnFilter sqlTypeToColumnFilter(DataType dataType, int numItems) {
    if (dataType instanceof BooleanType) {
      return new BooleanColumnFilter();
    } else if (dataType instanceof ByteType) {
      return new ByteColumnFilter();
    } else if (dataType instanceof ShortType) {
      return new ShortColumnFilter();
    } else if (dataType instanceof IntegerType) {
      return new IntColumnFilter(numItems);
    } else if (dataType instanceof LongType) {
      return new LongColumnFilter(numItems);
    } else if (dataType instanceof StringType) {
      return new UTF8ColumnFilter(numItems);
    } else if (dataType instanceof DateType) {
      return new DateColumnFilter(numItems);
    } else if (dataType instanceof TimestampType) {
      return new TimestampColumnFilter(numItems);
    } else {
      return noopFilter();
    }
  }
public static ColumnFilter sqlTypeToColumnFilter ( DataType dataType , int numItems ) { if ( dataType instanceof BooleanType ) { return new BooleanColumnFilter ( ) ; } else if ( dataType instanceof ByteType ) { return new ByteColumnFilter ( ) ; } else if ( dataType instanceof ShortType ) { return new ShortColumnFilter ( ) ; } else if ( dataType instanceof IntegerType ) { return new IntColumnFilter ( numItems ) ; } else if ( dataType instanceof LongType ) { return new LongColumnFilter ( numItems ) ; } else if ( dataType instanceof StringType ) { return new UTF8ColumnFilter ( numItems ) ; } else if ( dataType instanceof DateType ) { return new DateColumnFilter ( numItems ) ; } else if ( dataType instanceof TimestampType ) { return new TimestampColumnFilter ( numItems ) ; } else { return noopFilter ( ) ; } }
Select column filter for SQL data type.
Select column filter for SQL data type .