public void doLogicalPlan() {
    this.logicalPlan = planner.doLogicalPlan(analysis, context);
    if (isQuery() && LOGGER.isDebugEnabled()) {
      LOGGER.debug(
          "logical plan is: \n {}", PlanNodeUtil.nodeToString(this.logicalPlan.getRootNode()));
    }
    // check timeout after building logical plan because it could be time-consuming in some cases.
    checkTimeOutForQuery();
  }
QueryExecution stores all the status of a query which is being prepared or running inside the MPP
frame. It takes three main responsibilities: 1. Prepare a query. Transform a query from statement
to DistributedQueryPlan with fragment instances. 2. Dispatch all the fragment instances to
corresponding physical nodes. 3. Collect and monitor the progress/states of this query.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/QueryExecution.java