use of org.apache.jena.sparql.algebra.Table in project jena by apache.
the class QueryEngineRef method eval.
@Override
public QueryIterator eval(Op op, DatasetGraph dsg, Binding binding, Context context) {
if (binding.vars().hasNext())
op = Substitute.substitute(op, binding);
ExecutionContext execCxt = new ExecutionContext(context, dsg.getDefaultGraph(), dsg, QC.getFactory(context));
Evaluator eval = EvaluatorFactory.create(execCxt);
Table table = Eval.eval(eval, op);
QueryIterator qIter = table.iterator(execCxt);
return QueryIteratorCheck.check(qIter, execCxt);
}
use of org.apache.jena.sparql.algebra.Table in project jena by apache.
the class EvaluatorDispatch method visit.
@Override
public void visit(OpDisjunction opDisjunction) {
// Evaluation is as a concatentation of alternatives
Table table = TableFactory.createEmpty();
for (Iterator<Op> iter = opDisjunction.iterator(); iter.hasNext(); ) {
Op op = iter.next();
Table eltTable = eval(op);
table = evaluator.union(table, eltTable);
}
push(table);
}
use of org.apache.jena.sparql.algebra.Table in project jena by apache.
the class EvaluatorDispatch method visit.
@Override
public void visit(OpDistinct opDistinct) {
Table table = eval(opDistinct.getSubOp());
table = evaluator.distinct(table);
push(table);
}
use of org.apache.jena.sparql.algebra.Table in project jena by apache.
the class EvaluatorDispatch method visit.
@Override
public void visit(OpMinus opMinus) {
Table left = eval(opMinus.getLeft());
Table right = eval(opMinus.getRight());
Table table = evaluator.minus(left, right);
push(table);
}
use of org.apache.jena.sparql.algebra.Table in project jena by apache.
the class EvaluatorDispatch method visit.
@Override
public void visit(OpPath opPath) {
Table table = evaluator.pathPattern(opPath.getTriplePath());
push(table);
}
Aggregations