private void updateX(int groupId, Column xColumn, int xIndex) {
    if (xColumn.isNull(xIndex)) {
      xNulls.set(groupId, true);
    } else {
      xNulls.set(groupId, false);
      switch (xDataType) {
        case INT32:
        case DATE:
          xIntValues.set(groupId, xColumn.getInt(xIndex));
          break;
        case INT64:
        case TIMESTAMP:
          xLongValues.set(groupId, xColumn.getLong(xIndex));
          break;
        case FLOAT:
          xFloatValues.set(groupId, xColumn.getFloat(xIndex));
          break;
        case DOUBLE:
          xDoubleValues.set(groupId, xColumn.getDouble(xIndex));
          break;
        case TEXT:
        case STRING:
        case BLOB:
          xBinaryValues.set(groupId, xColumn.getBinary(xIndex));
          break;
        case BOOLEAN:
          xBooleanValues.set(groupId, xColumn.getBoolean(xIndex));
        default:
          throw new UnSupportedDataTypeException(
              String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", xDataType));
      }
    }
  }
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