@Override public BinaryStatistics copy() { return new BinaryStatistics(this); } }
@Override public void mergeStatisticsMinMax(Statistics stats) { BinaryStatistics binaryStats = (BinaryStatistics)stats; if (!this.hasNonNullValue()) { initializeStats(binaryStats.getMin(), binaryStats.getMax()); } else { updateStats(binaryStats.getMin(), binaryStats.getMax()); } }
private BinaryStatistics(BinaryStatistics other) { super(other.type()); if (other.hasNonNullValue()) { initializeStats(other.min, other.max); } setNumNulls(other.getNumNulls()); }
@Override public void updateStats(Binary value) { if (!this.hasNonNullValue()) { initializeStats(value, value); } else { updateStats(value, value); } }
private static BinaryStatistics stringColumnStats(String minimum, String maximum) { BinaryStatistics statistics = new BinaryStatistics(); statistics.setMinMax(Binary.fromString(minimum), Binary.fromString(maximum)); return statistics; }
/** * @param min a min binary * @param max a max binary * @deprecated use {@link #updateStats(Binary)}, will be removed in 2.0.0 */ @Deprecated public void setMinMax(Binary min, Binary max) { this.max = max; this.min = min; this.markAsNotEmpty(); }
@Override public boolean isSmallerThan(long size) { return !hasNonNullValue() || ((min.length() + max.length()) < size); }
/** * @param min_value a min binary * @param max_value a max binary * @deprecated use {@link #updateStats(Binary)}, will be removed in 2.0.0 */ @Deprecated public void updateStats(Binary min_value, Binary max_value) { if (comparator().compare(min, min_value) > 0) { min = min_value.copy(); } if (comparator().compare(max, max_value) < 0) { max = max_value.copy(); } }
@Override public void updateStats(Binary value) { if (!this.hasNonNullValue()) { initializeStats(value, value); } else { updateStats(value, value); } }
/** * @param min a min binary * @param max a max binary * @deprecated use {@link #updateStats(Binary)}, will be removed in 2.0.0 */ @Deprecated public void setMinMax(Binary min, Binary max) { this.max = max; this.min = min; this.markAsNotEmpty(); }
@Override public boolean isSmallerThan(long size) { return !hasNonNullValue() || ((min.length() + max.length()) < size); }
/** * @param min_value a min binary * @param max_value a max binary * @deprecated use {@link #updateStats(Binary)}, will be removed in 2.0.0 */ @Deprecated public void updateStats(Binary min_value, Binary max_value) { if (comparator().compare(min, min_value) > 0) { min = min_value.copy(); } if (comparator().compare(max, max_value) < 0) { max = max_value.copy(); } }
@Override public void mergeStatisticsMinMax(Statistics stats) { BinaryStatistics binaryStats = (BinaryStatistics)stats; if (!this.hasNonNullValue()) { initializeStats(binaryStats.getMin(), binaryStats.getMax()); } else { updateStats(binaryStats.getMin(), binaryStats.getMax()); } }
private BinaryStatistics(BinaryStatistics other) { super(other.type()); if (other.hasNonNullValue()) { initializeStats(other.min, other.max); } setNumNulls(other.getNumNulls()); }
@Override public BinaryStatistics copy() { return new BinaryStatistics(this); } }
/** * @param min_value a min binary * @param max_value a max binary * @deprecated use {@link #updateStats(Binary)}, will be removed in 2.0.0 */ @Deprecated public void initializeStats(Binary min_value, Binary max_value) { min = min_value.copy(); max = max_value.copy(); this.markAsNotEmpty(); }
/** * 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); } }
/** * @param min_value a min binary * @param max_value a max binary * @deprecated use {@link #updateStats(Binary)}, will be removed in 2.0.0 */ @Deprecated public void initializeStats(Binary min_value, Binary max_value) { min = min_value.copy(); max = max_value.copy(); this.markAsNotEmpty(); }