@Test public void test_等于子查询_存在多条件() { TableNode table1 = new TableNode("TABLE1"); table1.query("ID = (SELECT ID FROM TABLE2 WHERE NAME = 'HELLO' AND SCHOOL = 'HELLO' ) AND NAME = 3 AND SCHOOL IN ('A','B')"); table1.build(); QueryTreeNode qn = SubQueryPreProcessor.optimize(table1); Assert.assertTrue(qn instanceof JoinNode); Assert.assertEquals(null, table1.getWhereFilter()); }
public static QueryTreeNode optimize(QueryTreeNode qtn) throws QueryException { qtn = findComparisonsSubQueryToJoinNode(qtn); return qtn; }
SubQueryPreProcessor { public static QueryTreeNode optimize(QueryTreeNode qtn) throws QueryException { qtn = findComparisonsSubQueryToJoinNode(qtn); return qtn; } }
SubQueryPreProcessor { public static QueryTreeNode optimize(QueryTreeNode qtn) throws QueryException { qtn = findComparisonsSubQueryToJoinNode(qtn); return qtn; }  }
SubQueryPreProcessor { public static QueryTreeNode optimize(QueryTreeNode qtn) throws QueryException { qtn = findComparisonsSubQueryToJoinNode(qtn); return qtn; }  static QueryTreeNode optimize(QueryTreeNode qtn); }
SubQueryPreProcessor { public static QueryTreeNode optimize(QueryTreeNode qtn) throws QueryException { qtn = findComparisonsSubQueryToJoinNode(qtn); return qtn; }  static QueryTreeNode optimize(QueryTreeNode qtn);  }