Search in sources :

Example 31 with Table

use of org.apache.jena.sparql.algebra.Table in project jena by apache.

the class EvaluatorDispatch method visit.

@Override
public void visit(OpLeftJoin opLeftJoin) {
    Table left = eval(opLeftJoin.getLeft());
    Table right = eval(opLeftJoin.getRight());
    Table table = evaluator.leftJoin(left, right, opLeftJoin.getExprs());
    push(table);
}
Also used : Table(org.apache.jena.sparql.algebra.Table)

Example 32 with Table

use of org.apache.jena.sparql.algebra.Table in project jena by apache.

the class EvaluatorDispatch method visit.

@Override
public void visit(OpDiff opDiff) {
    Table left = eval(opDiff.getLeft());
    Table right = eval(opDiff.getRight());
    Table table = evaluator.diff(left, right);
    push(table);
}
Also used : Table(org.apache.jena.sparql.algebra.Table)

Example 33 with Table

use of org.apache.jena.sparql.algebra.Table in project jena by apache.

the class EvaluatorDispatch method visit.

@Override
public void visit(OpExtend opExtend) {
    Table table = eval(opExtend.getSubOp());
    table = evaluator.extend(table, opExtend.getVarExprList());
    push(table);
}
Also used : Table(org.apache.jena.sparql.algebra.Table)

Example 34 with Table

use of org.apache.jena.sparql.algebra.Table in project jena by apache.

the class EvaluatorDispatch method visit.

@Override
public void visit(OpAssign opAssign) {
    Table table = eval(opAssign.getSubOp());
    table = evaluator.assign(table, opAssign.getVarExprList());
    push(table);
}
Also used : Table(org.apache.jena.sparql.algebra.Table)

Example 35 with Table

use of org.apache.jena.sparql.algebra.Table in project jena by apache.

the class NodeTransformOp method transform.

@Override
public Op transform(OpTable opTable) {
    if (opTable.isJoinIdentity())
        return opTable;
    Table table = opTable.getTable();
    if (table.isEmpty())
        return opTable;
    if (TableUnit.isTableUnit(table))
        return opTable;
    if (table.getVars().size() == 0)
        return opTable;
    Table table2 = NodeTransformLib.transform(table, transform);
    return OpTable.create(table2);
}
Also used : Table(org.apache.jena.sparql.algebra.Table)

Aggregations

Table (org.apache.jena.sparql.algebra.Table)37 Var (org.apache.jena.sparql.core.Var)4 QueryIterator (org.apache.jena.sparql.engine.QueryIterator)4 Binding (org.apache.jena.sparql.engine.binding.Binding)4 Node (org.apache.jena.graph.Node)3 Op (org.apache.jena.sparql.algebra.Op)3 Graph (org.apache.jena.graph.Graph)2 ARQInternalErrorException (org.apache.jena.sparql.ARQInternalErrorException)2 OpGraph (org.apache.jena.sparql.algebra.op.OpGraph)2 TableEmpty (org.apache.jena.sparql.algebra.table.TableEmpty)2 BasicPattern (org.apache.jena.sparql.core.BasicPattern)2 DatasetGraph (org.apache.jena.sparql.core.DatasetGraph)2 ExecutionContext (org.apache.jena.sparql.engine.ExecutionContext)2 Test (org.junit.Test)2 InternalErrorException (org.apache.jena.atlas.lib.InternalErrorException)1 Triple (org.apache.jena.graph.Triple)1 OpBGP (org.apache.jena.sparql.algebra.op.OpBGP)1 OpTable (org.apache.jena.sparql.algebra.op.OpTable)1 TableN (org.apache.jena.sparql.algebra.table.TableN)1 QueryIterConcat (org.apache.jena.sparql.engine.iterator.QueryIterConcat)1