test_class.declarator: NODE = EmbeddedElasticsearchPolicy.create()
test_class.modifier: @ClassRule
      public static final
test_class.original_string: @ClassRule
      public static final EmbeddedElasticsearchPolicy NODE = EmbeddedElasticsearchPolicy.create();
test_class.type: EmbeddedElasticsearchPolicy
test_class.var_name: NODE
test_class.declarator: producer
test_class.modifier: private static
test_class.original_string: private static QueryProcedureProducer producer;
test_class.type: QueryProcedureProducer
test_class.var_name: producer
test_class.declarator: tableNames = Arrays.asList(
          "edu_manage.department",
          "student_profile.student",
          "edu_manage.department_student_relation",
          "action_required.homework_content",
          "action_required.action_detection_in_class")
test_class.modifier: private static
test_class.original_string: private static List<String> tableNames = Arrays.asList(
          "edu_manage.department",
          "student_profile.student",
          "edu_manage.department_student_relation",
          "action_required.homework_content",
          "action_required.action_detection_in_class");
test_class.type: List<String>
test_class.var_name: tableNames
test_class.file: core/src/test/java/com/qihoo/qsql/api/SqlLogicalPlanViewTest.java
test_class.identifier: SqlLogicalPlanViewTest
test_case.body: @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";
  
      }
test_case.class_method_signature: SqlLogicalPlanViewTest.getLogicalPlanView()
test_case.full_signature: @Test public void getLogicalPlanView()
test_case.identifier: getLogicalPlanView
test_case.invocations: assertEquals getLogicalPlanView getInstance
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getLogicalPlanView()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(SqlLogicalPlanView.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(SqlLogicalPlanView.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: tableNames
focal_class.modifier: private
focal_class.original_string: private List<String> tableNames;
focal_class.type: List<String>
focal_class.var_name: tableNames
focal_class.declarator: environment
focal_class.modifier: protected
focal_class.original_string: protected Builder environment;
focal_class.type: Builder
focal_class.var_name: environment
focal_class.declarator: VIEW = new SqlLogicalPlanView()
focal_class.modifier: public static final
focal_class.original_string: public static final SqlLogicalPlanView VIEW = new SqlLogicalPlanView();
focal_class.type: SqlLogicalPlanView
focal_class.var_name: VIEW
focal_class.file: core/src/main/java/com/qihoo/qsql/api/SqlLogicalPlanView.java
focal_class.identifier: SqlLogicalPlanView
focal_class.class_method_signature: SqlLogicalPlanView.SqlLogicalPlanView()
focal_class.full_signature: private  SqlLogicalPlanView()
focal_class.identifier: SqlLogicalPlanView
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  SqlLogicalPlanView()
focal_class.class_method_signature: SqlLogicalPlanView.getInstance()
focal_class.full_signature: public static SqlLogicalPlanView getInstance()
focal_class.identifier: getInstance
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: SqlLogicalPlanView
focal_class.signature: SqlLogicalPlanView getInstance()
focal_class.class_method_signature: SqlLogicalPlanView.getLogicalPlanView(String sql)
focal_class.full_signature: public String getLogicalPlanView(String sql)
focal_class.identifier: getLogicalPlanView
focal_class.modifiers: public
focal_class.parameters: (String sql)
focal_class.return: String
focal_class.signature: String getLogicalPlanView(String sql)
focal_class.class_method_signature: SqlLogicalPlanView.createQueryPlan(String sql)
focal_class.full_signature: private QueryProcedure createQueryPlan(String sql)
focal_class.identifier: createQueryPlan
focal_class.modifiers: private
focal_class.parameters: (String sql)
focal_class.return: QueryProcedure
focal_class.signature: QueryProcedure createQueryPlan(String sql)
focal_class.class_method_signature: SqlLogicalPlanView.getFullSchemaFromAssetDataSource()
focal_class.full_signature: private String getFullSchemaFromAssetDataSource()
focal_class.identifier: getFullSchemaFromAssetDataSource
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getFullSchemaFromAssetDataSource()
focal_class.class_method_signature: SqlLogicalPlanView.isPlanView(String sql)
focal_class.full_signature: public static boolean isPlanView(String sql)
focal_class.identifier: isPlanView
focal_class.modifiers: public static
focal_class.parameters: (String sql)
focal_class.return: boolean
focal_class.signature: boolean isPlanView(String sql)
focal_class.class_method_signature: SqlLogicalPlanView.getQueryProcedureLogicalView(QueryProcedure queryProcedure)
focal_class.full_signature: private String getQueryProcedureLogicalView(QueryProcedure queryProcedure)
focal_class.identifier: getQueryProcedureLogicalView
focal_class.modifiers: private
focal_class.parameters: (QueryProcedure queryProcedure)
focal_class.return: String
focal_class.signature: String getQueryProcedureLogicalView(QueryProcedure queryProcedure)
focal_method.body: 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);
      }
focal_method.class_method_signature: SqlLogicalPlanView.getLogicalPlanView(String sql)
focal_method.full_signature: public String getLogicalPlanView(String sql)
focal_method.identifier: getLogicalPlanView
focal_method.invocations: replace replace parseTableName setTransformRunner debug createQueryPlan getQueryProcedureLogicalView
focal_method.modifiers: public
focal_method.parameters: (String sql)
focal_method.return: String
focal_method.signature: String getLogicalPlanView(String sql)