@Test public void test_路径短化_组合() { TableNode table = new TableNode("TABLE1"); table.query("(1 = 1 AND (ID = 1 OR ID = 2) AND NAME = 'HELLO') OR (0=1 AND 1=1) OR (ID = 3)"); table.build(); FilterPreProcessor.optimize(table, true); System.out.println(FilterUtils.toDNFAndFlat(table.getWhereFilter())); Assert.assertEquals(table.getWhereFilter().toString(), "((TABLE1.ID = 1 AND TABLE1.NAME = HELLO) OR (TABLE1.ID = 2 AND TABLE1.NAME = HELLO) OR TABLE1.ID = 3)"); }
public static QueryTreeNode optimize(QueryTreeNode qtn, boolean typeConvert) throws QueryException { qtn = preProcess(qtn, typeConvert); return qtn; }
FilterPreProcessor { public static QueryTreeNode optimize(QueryTreeNode qtn, boolean typeConvert) throws QueryException { qtn = preProcess(qtn, typeConvert); return qtn; } }
FilterPreProcessor { public static QueryTreeNode optimize(QueryTreeNode qtn, boolean typeConvert) throws QueryException { qtn = preProcess(qtn, typeConvert); return qtn; }  }
FilterPreProcessor { public static QueryTreeNode optimize(QueryTreeNode qtn, boolean typeConvert) throws QueryException { qtn = preProcess(qtn, typeConvert); return qtn; }  static QueryTreeNode optimize(QueryTreeNode qtn, boolean typeConvert); }
FilterPreProcessor { public static QueryTreeNode optimize(QueryTreeNode qtn, boolean typeConvert) throws QueryException { qtn = preProcess(qtn, typeConvert); return qtn; }  static QueryTreeNode optimize(QueryTreeNode qtn, boolean typeConvert);  }