use of org.apache.jena.sparql.algebra.optimize.TransformFilterEquality in project jena by apache.
the class QueryEngineSDB method init.
// @Override
// protected Op modifyOp(Op op)
// {
// return op ;
// }
private void init(DatasetGraphSDB dsg, Query query, Binding initialBinding, Context context) {
if (context == null)
context = ARQ.getContext().copy();
// See "DynamicDatasets" -- this could be enabled.
if (query != null) {
if (query.hasDatasetDescription())
throw new SDBException("Queries with dataset descriptions (FROM/FROM NAMED) not supported");
}
if (context.isDefined(ARQConstants.sysDatasetDescription))
throw new SDBException("Queries with dataset descriptions set in the context not supported");
this.store = dsg.getStore();
this.request = new SDBRequest(store, query, context);
this.originalOp = getOp();
// Enable transformations : use own choice of transformations.
// e.g. don't place filters
// Op op = Algebra.optimize(originalOp, context) ;
Op op = originalOp;
// Do property functions.
op = Transformer.transform(new TransformPropertyFunction(context), op);
op = Transformer.transform(new TransformFilterEquality(), op);
// Quad it now so it can be passed to Compile.compile
op = Algebra.toQuadForm(op);
// Compile to SQL / extract parts to execute as SQL.
op = SDBCompile.compile(store, op, initialBinding, context, request);
setOp(op);
}
Aggregations