String query = "select count(*) from large1 " +
"join (select * from small1) a on large1_id = a.small1_id " +
"join small2 on large1_id = small2_id";
LogicalPlanner planner = new LogicalPlanner(catalog);
LogicalOptimizer optimizer = new LogicalOptimizer(conf);
Expr expr = analyzer.parse(query);
LogicalPlan plan = planner.createPlan(LocalTajoTestingUtility.createDummySession(), expr);
optimizer.optimize(plan);
QueryId queryId = QueryIdFactory.newQueryId(System.currentTimeMillis(), 0);
QueryContext queryContext = new QueryContext();
MasterPlan masterPlan = new MasterPlan(queryId, queryContext, plan);
GlobalPlanner globalPlanner = new GlobalPlanner(conf, catalog);