@Override
  protected void serializeAttributes(ByteBuffer byteBuffer) {
    PlanNodeType.DEVICE_VIEW.serialize(byteBuffer);
    mergeOrderParameter.serializeAttributes(byteBuffer);
    ReadWriteIOUtils.write(outputColumnNames.size(), byteBuffer);
    for (String column : outputColumnNames) {
      ReadWriteIOUtils.write(column, byteBuffer);
    }
    ReadWriteIOUtils.write(devices.size(), byteBuffer);
    for (IDeviceID deviceName : devices) {
      deviceName.serialize(byteBuffer);
    }
    ReadWriteIOUtils.write(deviceToMeasurementIndexesMap.size(), byteBuffer);
    for (Map.Entry<IDeviceID, List<Integer>> entry : deviceToMeasurementIndexesMap.entrySet()) {
      entry.getKey().serialize(byteBuffer);
      ReadWriteIOUtils.write(entry.getValue().size(), byteBuffer);
      for (Integer index : entry.getValue()) {
        ReadWriteIOUtils.write(index, byteBuffer);
      }
    }
  }
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