use of org.teiid.query.sql.lang.SubqueryCompareCriteria in project teiid by teiid.
the class TestSubqueryCompareCriteriaImpl method helpExample.
public static SubqueryCompareCriteria helpExample() {
// $NON-NLS-1$ //$NON-NLS-2$
ElementSymbol element = TestElementImpl.helpExample("g1", "e1");
Query query = TestQueryImpl.helpExample(true);
SubqueryCompareCriteria scc = new SubqueryCompareCriteria(element, query, AbstractCompareCriteria.GT, SubqueryCompareCriteria.ANY);
return scc;
}
use of org.teiid.query.sql.lang.SubqueryCompareCriteria in project teiid by teiid.
the class TestGroupRecontext method testConvertSubqueryCompareCriteria.
public void testConvertSubqueryCompareCriteria() throws Exception {
// $NON-NLS-1$
ElementSymbol e1 = new ElementSymbol("e1");
// $NON-NLS-1$
ElementSymbol x1 = new ElementSymbol("x1");
Map<ElementSymbol, ElementSymbol> symbolMap = new HashMap<ElementSymbol, ElementSymbol>();
symbolMap.put(e1, x1);
Query query = new Query();
SubqueryCompareCriteria crit = new SubqueryCompareCriteria(e1, query, SubqueryCompareCriteria.EQ, SubqueryCompareCriteria.ALL);
SubqueryCompareCriteria expected = new SubqueryCompareCriteria(x1, query, SubqueryCompareCriteria.EQ, SubqueryCompareCriteria.ALL);
FrameUtil.convertCriteria(crit, symbolMap, null, true);
assertEquals(crit, expected);
}
Aggregations