{
List<Triple> pattern = new ArrayList<Triple>();
pattern.add(Triple.create(Node.createVariable("s"), Node.createURI("http://example.org/value"), Node.createVariable("o")));
NodeRelation[] rels = translate(pattern, "optimizer/filtertests.n3");
NodeRelation intvalue = search("table2", "intvalue", rels);
NodeRelation value = search("table2", "value", rels);
pattern.clear();
pattern.add(Triple.create(Node.createVariable("s"), RDFS.label.asNode(), Node.createVariable("o")));
rels = translate(pattern, "optimizer/filtertests.n3");
NodeRelation langliteral = search("table1", "label_en", rels);
Expr filterint = new E_Equals(new E_Datatype(new ExprVar("o")), NodeValueNode.makeNode(Node.createURI(XSDDatatype.XSDint.getURI())));
Expr filterstring = new E_Equals(new E_Datatype(new ExprVar("o")), NodeValueNode.makeNode(Node.createURI(XSDDatatype.XSDstring.getURI())));
assertEquals("DATATYPE(intliteral) = xsd:int should be TRUE", Expression.TRUE, TransformExprToSQLApplyer.convert(filterint, intvalue));