@Test public void test_In子查询() { TableNode table1 = new TableNode("TABLE1"); table1.query("ID IN (SELECT ID FROM TABLE2)"); table1.build(); QueryTreeNode qn = SubQueryPreProcessor.optimize(table1); Assert.assertTrue(qn instanceof JoinNode); Assert.assertEquals("1", qn.getWhereFilter().toString()); }
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);  }