@Override
  public PlanNode visitCreateLogicalView(
      CreateLogicalViewStatement createLogicalViewStatement, MPPQueryContext context) {
    List<ViewExpression> viewExpressionList = new ArrayList<>();
    if (createLogicalViewStatement.getViewExpressions() == null) {
      // Transform all Expressions into ViewExpressions.
      TransformToViewExpressionVisitor transformToViewExpressionVisitor =
          new TransformToViewExpressionVisitor();
      List<Expression> expressionList = createLogicalViewStatement.getSourceExpressionList();
      for (Expression expression : expressionList) {
        viewExpressionList.add(transformToViewExpressionVisitor.process(expression, null));
      }
    } else {
      viewExpressionList = createLogicalViewStatement.getViewExpressions();
    }

    return new CreateLogicalViewNode(
        context.getQueryId().genPlanNodeId(),
        createLogicalViewStatement.getTargetPathList(),
        viewExpressionList);
  }
This visitor is used to generate a logical plan for the statement and returns the {@link
PlanNode}.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LogicalPlanVisitor.java