public static parquet.column.statistics.Statistics<?> readStats(Statistics statistics, PrimitiveTypeName type) { parquet.column.statistics.Statistics<?> stats = parquet.column.statistics.Statistics.getStatsBasedOnType(type); if (statistics != null) { if (statistics.isSetMax() && statistics.isSetMin()) { stats.setMinMaxFromBytes(statistics.min.array(), statistics.max.array()); } stats.setNumNulls(statistics.null_count); } return stats; }
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case MAX: return isSetMax(); case MIN: return isSetMin(); case NULL_COUNT: return isSetNull_count(); case DISTINCT_COUNT: return isSetDistinct_count(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case MAX: return getMax(); case MIN: return getMin(); case NULL_COUNT: return new Long(getNull_count()); case DISTINCT_COUNT: return new Long(getDistinct_count()); } throw new IllegalStateException(); }
public static Statistics toParquetStatistics(parquet.column.statistics.Statistics statistics) { Statistics stats = new Statistics(); if (!statistics.isEmpty()) { stats.setNull_count(statistics.getNumNulls()); if(statistics.hasNonNullValue()) { stats.setMax(statistics.getMaxBytes()); stats.setMin(statistics.getMinBytes()); } } return stats; }
case 5: // STATISTICS if (field.type == TType.STRUCT) { this.statistics = new Statistics(); this.statistics.read(iprot); } else { TProtocolUtil.skip(iprot, field.type);
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Statistics) return this.equals((Statistics)that); return false; }
public Statistics deepCopy() { return new Statistics(this); }
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case MAX: return isSetMax(); case MIN: return isSetMin(); case NULL_COUNT: return isSetNull_count(); case DISTINCT_COUNT: return isSetDistinct_count(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case MAX: return getMax(); case MIN: return getMin(); case NULL_COUNT: return new Long(getNull_count()); case DISTINCT_COUNT: return new Long(getDistinct_count()); } throw new IllegalStateException(); }
case 5: // STATISTICS if (field.type == TType.STRUCT) { this.statistics = new Statistics(); this.statistics.read(iprot); } else { TProtocolUtil.skip(iprot, field.type);
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Statistics) return this.equals((Statistics)that); return false; }
public Statistics deepCopy() { return new Statistics(this); }
return false; boolean this_present_max = true && this.isSetMax(); boolean that_present_max = true && that.isSetMax(); if (this_present_max || that_present_max) { if (!(this_present_max && that_present_max)) boolean this_present_min = true && this.isSetMin(); boolean that_present_min = true && that.isSetMin(); if (this_present_min || that_present_min) { if (!(this_present_min && that_present_min)) boolean this_present_null_count = true && this.isSetNull_count(); boolean that_present_null_count = true && that.isSetNull_count(); if (this_present_null_count || that_present_null_count) { if (!(this_present_null_count && that_present_null_count)) boolean this_present_distinct_count = true && this.isSetDistinct_count(); boolean that_present_distinct_count = true && that.isSetDistinct_count(); if (this_present_distinct_count || that_present_distinct_count) { if (!(this_present_distinct_count && that_present_distinct_count))
/** * Performs a deep copy on <i>other</i>. */ public Statistics(Statistics other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetMax()) { this.max = TBaseHelper.copyBinary(other.max); ; } if (other.isSetMin()) { this.min = TBaseHelper.copyBinary(other.min); ; } this.null_count = other.null_count; this.distinct_count = other.distinct_count; }
case 12: // STATISTICS if (field.type == TType.STRUCT) { this.statistics = new Statistics(); this.statistics.read(iprot); } else { TProtocolUtil.skip(iprot, field.type);
if (!(this_present_statistics && that_present_statistics)) return false; if (!this.statistics.equals(that.statistics)) return false;
/** * Performs a deep copy on <i>other</i>. */ public DataPageHeaderV2(DataPageHeaderV2 other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.num_values = other.num_values; this.num_nulls = other.num_nulls; this.num_rows = other.num_rows; if (other.isSetEncoding()) { this.encoding = other.encoding; } this.definition_levels_byte_length = other.definition_levels_byte_length; this.repetition_levels_byte_length = other.repetition_levels_byte_length; this.is_compressed = other.is_compressed; if (other.isSetStatistics()) { this.statistics = new Statistics(other.statistics); } }
return false; boolean this_present_max = true && this.isSetMax(); boolean that_present_max = true && that.isSetMax(); if (this_present_max || that_present_max) { if (!(this_present_max && that_present_max)) boolean this_present_min = true && this.isSetMin(); boolean that_present_min = true && that.isSetMin(); if (this_present_min || that_present_min) { if (!(this_present_min && that_present_min)) boolean this_present_null_count = true && this.isSetNull_count(); boolean that_present_null_count = true && that.isSetNull_count(); if (this_present_null_count || that_present_null_count) { if (!(this_present_null_count && that_present_null_count)) boolean this_present_distinct_count = true && this.isSetDistinct_count(); boolean that_present_distinct_count = true && that.isSetDistinct_count(); if (this_present_distinct_count || that_present_distinct_count) { if (!(this_present_distinct_count && that_present_distinct_count))
public static parquet.column.statistics.Statistics fromParquetStatistics(Statistics statistics, PrimitiveTypeName type) { // create stats object based on the column type parquet.column.statistics.Statistics stats = parquet.column.statistics.Statistics.getStatsBasedOnType(type); // If there was no statistics written to the footer, create an empty Statistics object and return if (statistics != null) { if (statistics.isSetMax() && statistics.isSetMin()) { stats.setMinMaxFromBytes(statistics.min.array(), statistics.max.array()); } stats.setNumNulls(statistics.null_count); } return stats; }
case 12: // STATISTICS if (field.type == TType.STRUCT) { this.statistics = new Statistics(); this.statistics.read(iprot); } else { TProtocolUtil.skip(iprot, field.type);