"c9 < c10 AND c11 < c12 OR c13 < c14 AND c15 < c16");
// interpretation: (!(c1 < c2)) or
// ((not (c3 < c4)) and (not (c5 < c6))) or
// ((c7 < c8) and (c9 < c10) and (c11 < c12)) or
// ((c13 < c14) and (c15 < c16))
QueryFilter filter = query.getFilter();
assertTrue(filter instanceof CompoundFilter);
CompoundFilter f = (CompoundFilter) filter;
assertEquals(CompoundFilter.LogicalOperator.OR, f.getOperator());
List<QueryFilter> subFilters = f.getSubFilters();
assertEquals(4, subFilters.size());
QueryFilter f1 = subFilters.get(0);
QueryFilter f2 = subFilters.get(1);
QueryFilter f3 = subFilters.get(2);
QueryFilter f4 = subFilters.get(3);
// f1: (!(c1 < c2))
assertTrue(f1 instanceof NegationFilter);
NegationFilter nf = (NegationFilter) f1;
QueryFilter subFilter = nf.getSubFilter();
assertTrue(subFilter instanceof ColumnColumnFilter);
assertEquals(Sets.newHashSet("c1", "c2"), subFilter.getAllColumnIds());
// f2: ((!(c3<c4)) && (!(c5<c6)))))
assertTrue(f2 instanceof CompoundFilter);
CompoundFilter cf = (CompoundFilter) f2;
assertEquals(CompoundFilter.LogicalOperator.AND, cf.getOperator());
subFilters = cf.getSubFilters();
assertEquals(2, subFilters.size());
assertTrue(subFilters.get(0) instanceof NegationFilter);
assertTrue(subFilters.get(1) instanceof NegationFilter);
QueryFilter tmp = ((NegationFilter) subFilters.get(0)).getSubFilter();
assertTrue(tmp instanceof ColumnColumnFilter);
assertEquals(Sets.newHashSet("c3", "c4"), tmp.getAllColumnIds());
tmp = ((NegationFilter) subFilters.get(1)).getSubFilter();
assertTrue(tmp instanceof ColumnColumnFilter);
assertEquals(Sets.newHashSet("c5", "c6"), tmp.getAllColumnIds());
//f3: ((c7 < c8) && (c9 < c10) && (c11 < c12))
assertTrue(f3 instanceof CompoundFilter);
cf = (CompoundFilter) f3;
assertEquals(CompoundFilter.LogicalOperator.AND, cf.getOperator());