@Override
  public void terminate(PointCollector pc) throws Exception {
    switch (dataType) {
      case INT32:
        pc.putInt(0, intMax - intMin);
        break;
      case INT64:
        pc.putLong(0, longMax - longMin);
        break;
      case FLOAT:
        pc.putFloat(0, floatMax - floatMin);
        break;
      case DOUBLE:
        pc.putDouble(0, doubleMax - doubleMin);
        break;
      case TEXT:
      case DATE:
      case STRING:
      case BOOLEAN:
      case TIMESTAMP:
      case BLOB:
      default:
        throw new NoNumberException();
    }
  }
This function is used to calculate the spread of time series, that is, the maximum value minus
the minimum value.
library-udf/src/main/java/org/apache/iotdb/library/dprofile/UDAFSpread.java