use of org.teiid.query.sql.lang.IsNullCriteria in project teiid by teiid.
the class TestExpressionEvaluator method testIsNull4.
@Test
public void testIsNull4() throws Exception {
IsNullCriteria inc = new IsNullCriteria(new Constant(Boolean.TRUE, DataTypeManager.DefaultDataClasses.BOOLEAN));
inc.setNegated(true);
assertEquals(Boolean.TRUE, Evaluator.evaluate(inc));
}
use of org.teiid.query.sql.lang.IsNullCriteria in project teiid by teiid.
the class TestExpressionEvaluator method testIsNull3.
@Test
public void testIsNull3() throws Exception {
IsNullCriteria inc = new IsNullCriteria(new Constant(null, DataTypeManager.DefaultDataClasses.BOOLEAN));
inc.setNegated(true);
assertEquals(Boolean.FALSE, Evaluator.evaluate(inc));
}
use of org.teiid.query.sql.lang.IsNullCriteria in project teiid by teiid.
the class TestAccessNode method testOpen_Defect16059_2.
@Test
public void testOpen_Defect16059_2() throws Exception {
// $NON-NLS-1$
Query query = (Query) TestResolver.helpResolve("SELECT e1, e2 FROM pm1.g1 WHERE e2 = 5 AND ? IS NOT NULL", RealMetadataFactory.example1Cached());
IsNullCriteria nullCrit = (IsNullCriteria) ((CompoundCriteria) query.getCriteria()).getCriteria(1);
nullCrit.setExpression(new Constant(null));
helpTestOpen(query, null, false);
}
use of org.teiid.query.sql.lang.IsNullCriteria in project teiid by teiid.
the class TestStaticSymbolMappingVisitor method testVisitIsNullCriteria.
public void testVisitIsNullCriteria() {
IsNullCriteria inc = new IsNullCriteria(exampleElement(true, 0));
helpTest(inc, getSymbolMap());
}
use of org.teiid.query.sql.lang.IsNullCriteria in project teiid by teiid.
the class TestIsNullCriteria method example.
// ################################## TEST HELPERS ################################
public static IsNullCriteria example(String element, boolean negated) {
IsNullCriteria crit = new IsNullCriteria();
crit.setNegated(negated);
crit.setExpression(new ElementSymbol(element));
return crit;
}
Aggregations