Search in sources :

Example 1 with OpGroup

use of org.apache.jena.sparql.algebra.op.OpGroup in project jena by apache.

the class OpRewriter method visit.

@Override
public void visit(OpGroup opGroup) {
    opGroup.getSubOp().visit(this);
    ExprRewriter expRewriter = new ExprRewriter(values);
    VarExprList groupVars = rewrite(opGroup.getGroupVars());
    List<ExprAggregator> aggregators = new ArrayList<>();
    for (ExprAggregator ea : opGroup.getAggregators()) {
        ea.visit(expRewriter);
        aggregators.add((ExprAggregator) expRewriter.pop());
    }
    push(new OpGroup(pop(), groupVars, aggregators));
}
Also used : OpGroup(org.apache.jena.sparql.algebra.op.OpGroup) ArrayList(java.util.ArrayList) ExprAggregator(org.apache.jena.sparql.expr.ExprAggregator) VarExprList(org.apache.jena.sparql.core.VarExprList)

Aggregations

ArrayList (java.util.ArrayList)1 OpGroup (org.apache.jena.sparql.algebra.op.OpGroup)1 VarExprList (org.apache.jena.sparql.core.VarExprList)1 ExprAggregator (org.apache.jena.sparql.expr.ExprAggregator)1