public static AggregationStep deserialize(ByteBuffer byteBuffer) {
    byte type = ReadWriteIOUtils.readByte(byteBuffer);
    switch (type) {
      case 0:
        return AggregationStep.PARTIAL;
      case 1:
        return AggregationStep.FINAL;
      case 2:
        return AggregationStep.INTERMEDIATE;
      case 3:
        return AggregationStep.SINGLE;
      case 4:
        return AggregationStep.STATIC;
      default:
        throw new IllegalArgumentException("Invalid AggregationStep type: " + type);
    }
  }
This attribute indicates the input and output type of the {@code Aggregator}.

<p>There are three types of input/output:

<ul>
  <li>Raw: raw data, as input only
  <li>Partial: intermediate aggregation result
  <li>Final: final aggregation result
</ul>
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/parameter/AggregationStep.java