@Override
  public Operator visitDeviceView(DeviceViewNode node, LocalExecutionPlanContext context) {
    OperatorContext operatorContext =
        context
            .getDriverContext()
            .addOperatorContext(
                context.getNextOperatorId(),
                node.getPlanNodeId(),
                DeviceViewOperator.class.getSimpleName());
    List<Operator> children = dealWithConsumeChildrenOneByOneNode(node, context);
    List<List<Integer>> deviceColumnIndex = new ArrayList<>(node.getDevices().size());
    if (context.getTemplatedInfo() != null) {
      for (int i = 0; i < node.getDevices().size(); i++) {
        deviceColumnIndex.add(context.getTemplatedInfo().getDeviceToMeasurementIndexes());
      }
    } else {
      deviceColumnIndex =
          node.getDevices().stream()
              .map(deviceName -> node.getDeviceToMeasurementIndexesMap().get(deviceName))
              .collect(Collectors.toList());
    }

    List<TSDataType> outputColumnTypes = getOutputColumnTypes(node, context.getTypeProvider());

    return new DeviceViewOperator(
        operatorContext, node.getDevices(), children, deviceColumnIndex, outputColumnTypes);
  }
This Visitor is responsible for transferring PlanNode Tree to Operator Tree.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/OperatorTreeGenerator.java