@Override
  public void reset() {
    inits.reset();
    xNulls.reset();
    switch (xDataType) {
      case INT32:
      case DATE:
        xIntValues.reset();
        break;
      case INT64:
      case TIMESTAMP:
        xLongValues.reset();
        break;
      case FLOAT:
        xFloatValues.reset();
        break;
      case DOUBLE:
        xDoubleValues.reset();
        break;
      case TEXT:
      case BLOB:
      case STRING:
        xBinaryValues.reset();
        break;
      case BOOLEAN:
        xBooleanValues.reset();
        break;
      default:
        throw new UnSupportedDataTypeException(
            String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", xDataType));
    }

    switch (yDataType) {
      case INT32:
      case DATE:
        yIntValues.reset();
        break;
      case INT64:
      case TIMESTAMP:
        yLongValues.reset();
        break;
      case FLOAT:
        yFloatValues.reset();
        break;
      case DOUBLE:
        yDoubleValues.reset();
        break;
      case TEXT:
      case BLOB:
      case STRING:
        yBinaryValues.reset();
        break;
      case BOOLEAN:
        yBooleanValues.reset();
        break;
      default:
        throw new UnSupportedDataTypeException(
            String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", yDataType));
    }
  }
max(x,y) returns the value of x associated with the maximum value of y over all input values.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/aggregation/grouped/GroupedMaxMinByBaseAccumulator.java