}
PlanNodeIdAllocator idAllocator = new PlanNodeIdAllocator();
PlanOptimizersFactory planOptimizersFactory = new PlanOptimizersFactory(metadata, splitManager);
QueryExplainer queryExplainer = new QueryExplainer(session, planOptimizersFactory.get(), metadata, new MockPeriodicImportManager(), new MockStorageManager());
Analyzer analyzer = new Analyzer(session, metadata, Optional.of(queryExplainer));
Analysis analysis = analyzer.analyze(statement);
Plan plan = new LogicalPlanner(session, planOptimizersFactory.get(), idAllocator, metadata, new MockPeriodicImportManager(), new MockStorageManager()).plan(analysis);