public static DeviceViewNode deserialize(ByteBuffer byteBuffer) {
    OrderByParameter mergeOrderParameter = OrderByParameter.deserialize(byteBuffer);

    int columnSize = ReadWriteIOUtils.readInt(byteBuffer);
    List<String> outputColumnNames = new ArrayList<>();
    while (columnSize > 0) {
      outputColumnNames.add(ReadWriteIOUtils.readString(byteBuffer));
      columnSize--;
    }

    int devicesSize = ReadWriteIOUtils.readInt(byteBuffer);
    List<IDeviceID> devices = new ArrayList<>();
    while (devicesSize > 0) {
      devices.add(IDeviceID.Deserializer.DEFAULT_DESERIALIZER.deserializeFrom(byteBuffer));
      devicesSize--;
    }

    int mapSize = ReadWriteIOUtils.readInt(byteBuffer);
    Map<IDeviceID, List<Integer>> deviceToMeasurementIndexesMap = new HashMap<>(mapSize);
    while (mapSize > 0) {
      IDeviceID deviceName =
          IDeviceID.Deserializer.DEFAULT_DESERIALIZER.deserializeFrom(byteBuffer);
      int listSize = ReadWriteIOUtils.readInt(byteBuffer);
      List<Integer> indexes = new ArrayList<>(listSize);
      while (listSize > 0) {
        indexes.add(ReadWriteIOUtils.readInt(byteBuffer));
        listSize--;
      }
      deviceToMeasurementIndexesMap.put(deviceName, indexes);
      mapSize--;
    }
    PlanNodeId planNodeId = PlanNodeId.deserialize(byteBuffer);
    return new DeviceViewNode(
        planNodeId, mergeOrderParameter, outputColumnNames, devices, deviceToMeasurementIndexesMap);
  }
DeviceViewNode is responsible for constructing a device-based view of a set of series. And output
the result with specific order. The order could be 'order by device' or 'order by timestamp'

<p>Each output from its children should have the same schema. That means, the columns should be
same between these TsBlocks. If the input TsBlock contains n columns, the device-based view will
contain n+1 columns where the new column is Device column.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/process/DeviceViewNode.java