private AlignedUpdateLastCacheOperator createAlignedUpdateLastCacheOperator(
      final AlignedLastQueryScanNode node,
      final AlignedPath unCachedPath,
      final LocalExecutionPlanContext context) {
    final AlignedSeriesAggregationScanOperator lastQueryScan =
        createLastQueryScanOperator(
            node, (AlignedFullPath) IFullPath.convertToIFullPath(unCachedPath), context);

    final OperatorContext operatorContext =
        context
            .getDriverContext()
            .addOperatorContext(
                context.getNextOperatorId(),
                node.getPlanNodeId(),
                AlignedUpdateLastCacheOperator.class.getSimpleName());

    final boolean isNeedUpdateLastCache = context.isNeedUpdateLastCache();
    if (isNeedUpdateLastCache) {
      final int size = unCachedPath.getColumnNum();
      final PartialPath devicePath = unCachedPath.getDevicePath();
      final String databaseName =
          ((DataDriverContext) operatorContext.getDriverContext())
              .getDataRegion()
              .getDatabaseName();

      for (int i = 0; i < size; ++i) {
        TreeDeviceSchemaCacheManager.getInstance()
            .updateLastCache(
                databaseName,
                new MeasurementPath(
                    devicePath.concatNode(unCachedPath.getMeasurementList().get(i)),
                    unCachedPath.getSchemaList().get(i),
                    true),
                false);
      }
    }

    return Objects.isNull(node.getOutputViewPath())
        ? new AlignedUpdateLastCacheOperator(
            operatorContext,
            lastQueryScan,
            unCachedPath,
            DATA_NODE_SCHEMA_CACHE,
            isNeedUpdateLastCache,
            context.isNeedUpdateNullEntry())
        : new AlignedUpdateViewPathLastCacheOperator(
            operatorContext,
            lastQueryScan,
            unCachedPath,
            DATA_NODE_SCHEMA_CACHE,
            isNeedUpdateLastCache,
            context.isNeedUpdateNullEntry(),
            node.getOutputViewPath());
  }
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