Example #1
0
  public Datum getMaxValue() {
    ColumnStatProtoOrBuilder p = viaProto ? proto : builder;
    if (maxValue != null) {
      return this.maxValue;
    }
    if (!p.hasMaxValue()) {
      return null;
    }
    this.maxValue =
        TupleUtil.createFromBytes(getColumn().getDataType(), p.getMaxValue().toByteArray());

    return this.maxValue;
  }
Example #2
0
 @Override
 public void initFromProto() {
   ColumnStatProtoOrBuilder p = viaProto ? proto : builder;
   if (this.column == null && p.hasColumn()) {
     this.column = new Column(p.getColumn());
   }
   if (this.numDistVals == null && p.hasNumDistVal()) {
     this.numDistVals = p.getNumDistVal();
   }
   if (this.numNulls == null && p.hasNumNulls()) {
     this.numNulls = p.getNumNulls();
   }
   if (this.minValue == null && p.hasMinValue()) {
     this.minValue =
         TupleUtil.createFromBytes(getColumn().getDataType(), p.getMinValue().toByteArray());
   }
   if (this.maxValue == null && p.hasMaxValue()) {
     this.maxValue =
         TupleUtil.createFromBytes(getColumn().getDataType(), p.getMaxValue().toByteArray());
   }
 }