@Override public BinaryStatistics copy() { return new BinaryStatistics(this); } }
@Override public BinaryStatistics copy() { return new BinaryStatistics(this); } }
/** * Returns the typed statistics object based on the passed type parameter * @param type PrimitiveTypeName type of the column * @return instance of a typed statistics class * @deprecated Use {@link #createStats(Type)} instead */ @Deprecated public static Statistics getStatsBasedOnType(PrimitiveTypeName type) { switch (type) { case INT32: return new IntStatistics(); case INT64: return new LongStatistics(); case FLOAT: return new FloatStatistics(); case DOUBLE: return new DoubleStatistics(); case BOOLEAN: return new BooleanStatistics(); case BINARY: return new BinaryStatistics(); case INT96: return new BinaryStatistics(); case FIXED_LEN_BYTE_ARRAY: return new BinaryStatistics(); default: throw new UnknownColumnTypeException(type); } }
/** * Returns the typed statistics object based on the passed type parameter * @param type PrimitiveTypeName type of the column * @return instance of a typed statistics class * @deprecated Use {@link #createStats(Type)} instead */ @Deprecated public static Statistics getStatsBasedOnType(PrimitiveTypeName type) { switch (type) { case INT32: return new IntStatistics(); case INT64: return new LongStatistics(); case FLOAT: return new FloatStatistics(); case DOUBLE: return new DoubleStatistics(); case BOOLEAN: return new BooleanStatistics(); case BINARY: return new BinaryStatistics(); case INT96: return new BinaryStatistics(); case FIXED_LEN_BYTE_ARRAY: return new BinaryStatistics(); default: throw new UnknownColumnTypeException(type); } }
if (implicitColValues.containsKey(columnName)) { TypeProtos.MajorType type = Types.required(TypeProtos.MinorType.VARCHAR); Statistics stat = new BinaryStatistics(); stat.setNumNulls(0); byte[] val = implicitColValues.get(columnName).getBytes();
private static BinaryStatistics stringColumnStats(String minimum, String maximum) { BinaryStatistics statistics = new BinaryStatistics(); statistics.setMinMax(Binary.fromString(minimum), Binary.fromString(maximum)); return statistics; }
if (implicitColValues.containsKey(columnName)) { TypeProtos.MajorType type = Types.required(TypeProtos.MinorType.VARCHAR); Statistics stat = new BinaryStatistics(); stat.setNumNulls(0); byte[] val = implicitColValues.get(columnName).getBytes();
/** * Creates an empty {@code Statistics} instance for the specified type to be * used for reading/writing the new min/max statistics used in the V2 format. * * @param type * type of the column * @return instance of a typed statistics class */ public static Statistics<?> createStats(Type type) { PrimitiveType primitive = type.asPrimitiveType(); switch (primitive.getPrimitiveTypeName()) { case INT32: return new IntStatistics(primitive); case INT64: return new LongStatistics(primitive); case FLOAT: return new FloatStatistics(primitive); case DOUBLE: return new DoubleStatistics(primitive); case BOOLEAN: return new BooleanStatistics(primitive); case BINARY: case INT96: case FIXED_LEN_BYTE_ARRAY: return new BinaryStatistics(primitive); default: throw new UnknownColumnTypeException(primitive.getPrimitiveTypeName()); } }
/** * Creates an empty {@code Statistics} instance for the specified type to be * used for reading/writing the new min/max statistics used in the V2 format. * * @param type * type of the column * @return instance of a typed statistics class */ public static Statistics<?> createStats(Type type) { PrimitiveType primitive = type.asPrimitiveType(); switch (primitive.getPrimitiveTypeName()) { case INT32: return new IntStatistics(primitive); case INT64: return new LongStatistics(primitive); case FLOAT: return new FloatStatistics(primitive); case DOUBLE: return new DoubleStatistics(primitive); case BOOLEAN: return new BooleanStatistics(primitive); case BINARY: case INT96: case FIXED_LEN_BYTE_ARRAY: return new BinaryStatistics(primitive); default: throw new UnknownColumnTypeException(primitive.getPrimitiveTypeName()); } }