public static PlanNode analyzeStatementToPlanNode(Statement statement) {
    MPPQueryContext context =
        new MPPQueryContext(
            "",
            new QueryId("test_query"),
            new SessionInfo(0, AuthorityChecker.SUPER_USER, ZoneId.systemDefault()),
            DataNodeEndPoints.LOCAL_HOST_DATA_BLOCK_ENDPOINT,
            DataNodeEndPoints.LOCAL_HOST_INTERNAL_ENDPOINT);
    Analyzer analyzer =
        new Analyzer(context, new FakePartitionFetcherImpl(), new FakeSchemaFetcherImpl());
    Analysis analysis = analyzer.analyze(statement);
    return new LogicalPlanVisitor(analysis).process(analysis.getTreeStatement(), context);
  }
This class generates logical plans for test cases of the read statements.
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/logical/LogicalPlannerTestUtil.java