@Override
  public Operator visitInference(InferenceNode node, LocalExecutionPlanContext context) {
    Operator child = node.getChild().accept(this, context);
    OperatorContext operatorContext =
        context
            .getDriverContext()
            .addOperatorContext(
                context.getNextOperatorId(),
                node.getPlanNodeId(),
                org.apache.iotdb.db.queryengine.execution.operator.process.ai.InferenceOperator
                    .class
                    .getSimpleName());

    ModelInferenceDescriptor modelInferenceDescriptor = node.getModelInferenceDescriptor();
    ModelInformation modelInformation = modelInferenceDescriptor.getModelInformation();
    int[] inputShape = modelInformation.getInputShape();
    int[] outputShape = modelInformation.getOutputShape();
    TSDataType[] inputTypes = modelInferenceDescriptor.getModelInformation().getInputDataType();
    TSDataType[] outputTypes = modelInferenceDescriptor.getModelInformation().getOutputDataType();

    long maxRetainedSize =
        calculateSize(inputShape[0], inputTypes) + TimeColumn.SIZE_IN_BYTES_PER_POSITION;
    long maxReturnSize = calculateSize(outputShape[0], outputTypes);

    return new org.apache.iotdb.db.queryengine.execution.operator.process.ai.InferenceOperator(
        operatorContext,
        child,
        modelInferenceDescriptor,
        FragmentInstanceManager.getInstance().getModelInferenceExecutor(),
        node.getInputColumnNames(),
        node.getChild().getOutputColumnNames(),
        node.isGenerateTimeColumn(),
        maxRetainedSize,
        maxReturnSize);
  }
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