public Plan getPlan() { if ( plan == null ) plan = createPlan() ; return plan ; }
private QueryIterator evaluateNoMgt(Op op, DatasetGraph dsg, Binding binding, Context context) { return eval(op, dsg, binding, context) ; }
protected Plan createPlan() { // Decide the algebra to actually execute. Op op = modifyOp(queryOp) ; QueryIterator queryIterator = null ; if ( dataset != null ) // Null means setting up but not executing a query. queryIterator = evaluate(op, dataset, startBinding, context) ; else // Bypass management interface queryIterator = evaluateNoMgt(op, dataset, startBinding, context) ; // This could be an automagic iterator to catch close. return new PlanOp(getOp(), this, queryIterator) ; }
protected QueryEngineBase(Op op, DatasetGraph dataset, Binding input, Context context) { this(dataset, input, context) ; query = null ; setOp(op) ; }
private QueryEngineBase(DatasetGraph dataset, Binding input, Context context) { this.dataset = dataset ; // Maybe null e.g. in query this.context = setupContext(context, dataset) ; if ( input == null ) { Log.warn(this, "Null initial input") ; input = BindingRoot.create() ; } this.startBinding = input ; }
protected Plan createPlan() { // Decide the algebra to actually execute. Op op = queryOp ; if ( ! startBinding.isEmpty() ) { op = Substitute.substitute(op, startBinding) ; context.put(ARQConstants.sysCurrentAlgebra, op) ; // Don't reset the startBinding because it also is // needed in the output. } op = modifyOp(op) ; QueryIterator queryIterator = null ; if ( dataset != null ) // Null means setting up but not executing a query. queryIterator = evaluate(op, dataset, startBinding, context) ; else // Bypass management interface queryIterator = evaluateNoMgt(op, dataset, startBinding, context) ; // This could be an automagic iterator to catch close. return new PlanOp(getOp(), this, queryIterator) ; }
protected QueryEngineBase(Op op, DatasetGraph dataset, Binding input, Context cxt) { this(dataset, input, cxt) ; // Ensure context setup - usually done in QueryExecutionBase // so it can be changed after initialization. if ( context == null ) context = Context.setupContext(context, dataset) ; this.query = null ; setOp(op) ; }
private QueryIterator evaluateNoMgt(Op op, DatasetGraph dsg, Binding binding, Context context) { return eval(op, dsg, binding, context) ; }
public Plan getPlan() { if ( plan == null ) plan = createPlan() ; return plan ; }
final public QueryIterator evaluate(Op op, DatasetGraph dsg, Binding binding, Context context) { if ( query != null ) Explain.explain("QUERY", query, context) ; Explain.explain("ALGEBRA", op, context) ; queryEngineInfo.incQueryCount() ; queryEngineInfo.setLastQueryExecAt() ; //queryEngineInfo.setLastQueryExecTime(-1) ; queryEngineInfo.setLastQueryString((Query)context.get(ARQConstants.sysCurrentQuery)) ; queryEngineInfo.setLastOp(op) ; return eval(op, dsg, binding, context) ; }
@Override final public QueryIterator evaluate(Op op, DatasetGraph dsg, Binding binding, Context context) { if ( query != null ) Explain.explain("QUERY", query, context) ; Explain.explain("ALGEBRA", op, context) ; queryEngineInfo.incQueryCount() ; queryEngineInfo.setLastQueryExecAt() ; //queryEngineInfo.setLastQueryExecTime(-1) ; queryEngineInfo.setLastQueryString((Query)context.get(ARQConstants.sysCurrentQuery)) ; queryEngineInfo.setLastOp(op) ; return eval(op, dsg, binding, context) ; }