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);
Expr sameTerm = new E_SameTerm(new ExprVar("o"), NodeValue.makeNode("1", XSDDatatype.XSDint));
Expression result = TransformExprToSQLApplyer.convert(sameTerm, intvalue);
TypedNodeMaker nm = (TypedNodeMaker) intvalue.nodeMaker(Var.alloc("o"));
Expression expected = nm.valueMaker().valueExpression("1");
assertEquals("sameTerm(?o, \"1\"^^xsd:int)", expected, result);
sameTerm = new E_SameTerm(new ExprVar("o"), NodeValue.makeNode("1", XSDDatatype.XSDdecimal));
result = TransformExprToSQLApplyer.convert(sameTerm, intvalue);
assertEquals("sameTerm(?o, \"1\"^^xsd:decimal)", Expression.FALSE, result);
}