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; }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_max = true && (isSetMax()); builder.append(present_max); if (present_max) builder.append(max); boolean present_min = true && (isSetMin()); builder.append(present_min); if (present_min) builder.append(min); boolean present_null_count = true && (isSetNull_count()); builder.append(present_null_count); if (present_null_count) builder.append(null_count); boolean present_distinct_count = true && (isSetDistinct_count()); builder.append(present_distinct_count); if (present_distinct_count) builder.append(distinct_count); return builder.toHashCode(); }
/** * 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; }
/** 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 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; }
/** 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(); }
/** * 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; }
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; }
if (isSetMin()) { if (!first) sb.append(", "); sb.append("min:");
if (isSetMin()) { if (!first) sb.append(", "); sb.append("min:");
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_max = true && (isSetMax()); builder.append(present_max); if (present_max) builder.append(max); boolean present_min = true && (isSetMin()); builder.append(present_min); if (present_min) builder.append(min); boolean present_null_count = true && (isSetNull_count()); builder.append(present_null_count); if (present_null_count) builder.append(null_count); boolean present_distinct_count = true && (isSetDistinct_count()); builder.append(present_distinct_count); if (present_distinct_count) builder.append(distinct_count); return builder.toHashCode(); }
public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.max != null) { if (isSetMax()) { oprot.writeFieldBegin(MAX_FIELD_DESC); oprot.writeBinary(this.max); oprot.writeFieldEnd(); } } if (this.min != null) { if (isSetMin()) { oprot.writeFieldBegin(MIN_FIELD_DESC); oprot.writeBinary(this.min); oprot.writeFieldEnd(); } } if (isSetNull_count()) { oprot.writeFieldBegin(NULL_COUNT_FIELD_DESC); oprot.writeI64(this.null_count); oprot.writeFieldEnd(); } if (isSetDistinct_count()) { oprot.writeFieldBegin(DISTINCT_COUNT_FIELD_DESC); oprot.writeI64(this.distinct_count); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.max != null) { if (isSetMax()) { oprot.writeFieldBegin(MAX_FIELD_DESC); oprot.writeBinary(this.max); oprot.writeFieldEnd(); } } if (this.min != null) { if (isSetMin()) { oprot.writeFieldBegin(MIN_FIELD_DESC); oprot.writeBinary(this.min); oprot.writeFieldEnd(); } } if (isSetNull_count()) { oprot.writeFieldBegin(NULL_COUNT_FIELD_DESC); oprot.writeI64(this.null_count); oprot.writeFieldEnd(); } if (isSetDistinct_count()) { oprot.writeFieldBegin(DISTINCT_COUNT_FIELD_DESC); oprot.writeI64(this.distinct_count); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }