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

    switch (yDataType) {
      case INT32:
      case DATE:
        valuesSize += yIntValues.sizeOf();
        break;
      case INT64:
      case TIMESTAMP:
        valuesSize += yLongValues.sizeOf();
        break;
      case FLOAT:
        valuesSize += yFloatValues.sizeOf();
        break;
      case DOUBLE:
        valuesSize += yDoubleValues.sizeOf();
        break;
      case TEXT:
      case STRING:
      case BLOB:
        valuesSize += yBinaryValues.sizeOf();
        break;
      case BOOLEAN:
        valuesSize += yBooleanValues.sizeOf();
        break;
      default:
        throw new UnSupportedDataTypeException(
            String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", xDataType));
    }

    return INSTANCE_SIZE + valuesSize + inits.sizeOf() + xNulls.sizeOf();
  }
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