@Test
public void test_合并_Group_OR条件() {

    TableNode table = new TableNode("TABLE1");
    table.query("ID = 1 OR 2 = ID OR ID = 3 OR ID IN (4 , 5)");
    table.build();
    FilterPreProcessor.optimize(table, true, null);
    Assert.assertEquals(table.getWhereFilter().toString(), "TABLE1.ID IN [1, 2, 3, 4, 5]");
    table.query("ID = 1 OR ID = 2 OR 3 < ID");
    table.build();
    FilterPreProcessor.optimize(table, true, null);
    Assert.assertEquals(table.getWhereFilter().toString(), "(TABLE1.ID IN [1, 2] OR TABLE1.ID > 3)");
    table.query("(ID = 1 OR ID > 3) AND NAME = 'LJH'");
    table.build();
    FilterPreProcessor.optimize(table, true, null);
    Assert.assertEquals(table.getWhereFilter().toString(),
        "((TABLE1.ID = 1 OR TABLE1.ID > 3) AND TABLE1.NAME = LJH)");
    table.query("((ID = 1 OR ID > 3) OR NAME = 'LJH') OR ID = 2");
    // 目前不会调整or条件的顺序来满足group
    table.build();
    FilterPreProcessor.optimize(table, true, null);
    FilterPreProcessor.optimize(table, true, null);
    Assert.assertEquals(table.getWhereFilter().toString(),
        "((TABLE1.ID = 1 OR TABLE1.ID > 3) OR TABLE1.NAME = LJH OR TABLE1.ID = 2)");
    table.query("ID = 1 OR ID = sqrt(2) OR ID = 2");
    // 目前针对列非常量的不满足group
    table.build();
    FilterPreProcessor.optimize(table, true, null);
    Assert.assertEquals(table.getWhereFilter().toString(),
        "(TABLE1.ID = 1 OR TABLE1.ID = SQRT(2) OR TABLE1.ID = 2)");
}