### Question:
SqlLogicalPlanView { public String getLogicalPlanView(String sql) { sql = sql.replace("explain ","").replace("EXPLAIN ",""); QueryTables tables = SqlUtil.parseTableName(sql); tableNames = tables.tableNames; environment.setTransformRunner(RunnerType.JDBC); LOGGER.debug("Parsed table names for upper SQL are: {}", tableNames); QueryProcedure procedure = createQueryPlan(sql); return getQueryProcedureLogicalView(procedure); } private  SqlLogicalPlanView(); static SqlLogicalPlanView getInstance(); String getLogicalPlanView(String sql); static boolean isPlanView(String sql); static final SqlLogicalPlanView VIEW; }### Answer:
@Test public void getLogicalPlanView() { String onlyValueSql = "explain SELECT 'Hello World' AS col1, 1010 AS col2"; Assert.assertEquals( SqlLogicalPlanView.getInstance().getLogicalPlanView(onlyValueSql), "{\"child\":[null],\"name\":\"LogicalProject\",\"keySet\":[\"fields\"]," + "\"commonMap\":{\"fields\":\"[<col1, CHAR(11)>, <col2, INTEGER>]\"}}"); String withKeyWordsSql = "WITH department AS \n" + " (SELECT times\n" + " FROM edu_manage.department\n" + " GROUP BY times), student AS \n" + " (SELECT *\n" + " FROM student_profile.student LIMIT 30) \n" + " (SELECT *\n" + " FROM edu_manage.department\n" + " INNER JOIN student\n" + " ON department.times = student.city LIMIT 10)"; String joinWhereOrderSql = "SELECT dep_id FROM " + "edu_manage" + ".department inner join (SELECT COUNT(times),times FROM edu_manage.department group by times LIMIT 10 " + ") as b on edu_manage.department.times = b.times " + "WHERE 1=1 and " + "b.times > 2 AND b.times NOT IN(1, 2, 4) order by b.times"; String unionSql = "SELECT dep_id FROM edu_manage.department WHERE floor(times) = 1" + " union select dep_id from edu_manage.department WHERE times = 1"; }