JVMDistinctBindingSetsOp.Annotations.SHARED_STATE, true)); left = new JVMDistinctBindingSetsOp(leftOrEmpty(left),// anns.toArray(new NV[anns.size()])); left = new HTreeDistinctBindingSetsOp(leftOrEmpty(left),// anns.toArray(new NV[anns.size()]));
JVMDistinctBindingSetsOp.Annotations.SHARED_STATE, true)); left = new JVMDistinctBindingSetsOp(leftOrEmpty(left),// anns.toArray(new NV[anns.size()])); left = new HTreeDistinctBindingSetsOp(leftOrEmpty(left),// anns.toArray(new NV[anns.size()]));
final AST2BOpContext ctx) { return new VariableUnificationOp(leftOrEmpty(left), new NV(VariableUnificationOp.Annotations.VARS, new IVariable[] { targetVar, tmpVar }),
ve); left = applyQueryHints(new ConditionalRoutingOp(leftOrEmpty(left),// new NV(BOp.Annotations.BOP_ID, bopId), // new NV(ConditionalRoutingOp.Annotations.CONDITION, c)//
final AST2BOpContext ctx) { return new VariableUnificationOp(leftOrEmpty(left), new NV(VariableUnificationOp.Annotations.VARS, new IVariable[] { targetVar, tmpVar }),
left = new DataSetJoin(leftOrEmpty(left), NV.asMap(new NV[] {// new NV(DataSetJoin.Annotations.VAR, var),// new NV(DataSetJoin.Annotations.BOP_ID, ctx.nextId()),//
left = new DataSetJoin(leftOrEmpty(left), NV.asMap(new NV[] {// new NV(DataSetJoin.Annotations.VAR, var),// new NV(DataSetJoin.Annotations.BOP_ID, ctx.nextId()),//
return (PipelineOp) applyQueryHints(new MockTermResolverOp(leftOrEmpty(left), new NV(MockTermResolverOp.Annotations.VARS, vars.toArray(new IVariable[nvars])),// new NV(MockTermResolverOp.Annotations.RELATION_NAME, new String[] { ns }), //
return (PipelineOp) applyQueryHints(new MockTermResolverOp(leftOrEmpty(left), new NV(MockTermResolverOp.Annotations.VARS, vars.toArray(new IVariable[nvars])),// new NV(MockTermResolverOp.Annotations.RELATION_NAME, new String[] { ns }), //
BOpEvaluationContext.CONTROLLER)) { left = new EndOp(leftOrEmpty(left),// NV.asMap(
BOpEvaluationContext.CONTROLLER)) { left = new EndOp(leftOrEmpty(left),// NV.asMap(
leftOrEmpty(left), NV.asMap(new NV[] {// new NV(MemorySortOp.Annotations.BOP_ID, sortId),//
/** * Generate the query plan for a zero length path. */ private static PipelineOp convertZeroLengthPath(PipelineOp left, final ZeroLengthPathNode zlpNode, final Set<IVariable<?>> doneSet, final AST2BOpContext ctx) { final IVariableOrConstant<?> leftTerm = (IVariableOrConstant<?>) zlpNode.left().getValueExpression(); final IVariableOrConstant<?> rightTerm = (IVariableOrConstant<?>) zlpNode.right().getValueExpression(); left = applyQueryHints(new ZeroLengthPathOp(leftOrEmpty(left),// new NV(ZeroLengthPathOp.Annotations.LEFT_TERM, leftTerm), new NV(ZeroLengthPathOp.Annotations.RIGHT_TERM, rightTerm), new NV(Predicate.Annotations.BOP_ID, ctx.nextId()),// new NV(BOp.Annotations.EVALUATION_CONTEXT, BOpEvaluationContext.CONTROLLER)// ), zlpNode, ctx); return left; }
/** * Generate the query plan for a zero length path. */ private static PipelineOp convertZeroLengthPath(PipelineOp left, final ZeroLengthPathNode zlpNode, final Set<IVariable<?>> doneSet, final AST2BOpContext ctx) { final IVariableOrConstant<?> leftTerm = (IVariableOrConstant<?>) zlpNode.left().getValueExpression(); final IVariableOrConstant<?> rightTerm = (IVariableOrConstant<?>) zlpNode.right().getValueExpression(); left = applyQueryHints(new ZeroLengthPathOp(leftOrEmpty(left),// new NV(ZeroLengthPathOp.Annotations.LEFT_TERM, leftTerm), new NV(ZeroLengthPathOp.Annotations.RIGHT_TERM, rightTerm), new NV(Predicate.Annotations.BOP_ID, ctx.nextId()),// new NV(BOp.Annotations.EVALUATION_CONTEXT, BOpEvaluationContext.CONTROLLER)// ), zlpNode, ctx); return left; }
left = new NestedLoopJoinOp(leftOrEmpty(left), new NV(
leftOrEmpty(left), NV.asMap(new NV[] {// new NV(MemorySortOp.Annotations.BOP_ID, sortId),//
left = new NestedLoopJoinOp(leftOrEmpty(left), new NV(
left = new SubqueryOp(leftOrEmpty(left),// SUBQUERY new NV(Predicate.Annotations.BOP_ID, ctx.nextId()),// new NV(SubqueryOp.Annotations.SUBQUERY, subqueryPlan),//
/** * Impose an OFFSET and/or LIMIT on a query. */ private static final PipelineOp addSlice(PipelineOp left, final QueryBase queryBase, final SliceNode slice, final AST2BOpContext ctx) { final int bopId = ctx.nextId(); left = applyQueryHints(new SliceOp(leftOrEmpty(left),// new NV(SliceOp.Annotations.BOP_ID, bopId),// new NV(SliceOp.Annotations.OFFSET, slice.getOffset()),// new NV(SliceOp.Annotations.LIMIT, slice.getLimit()),// new NV(SliceOp.Annotations.EVALUATION_CONTEXT, BOpEvaluationContext.CONTROLLER),// new NV(SliceOp.Annotations.PIPELINED, true),// new NV(SliceOp.Annotations.MAX_PARALLEL, 1),// new NV(SliceOp.Annotations.REORDER_SOLUTIONS,false),// new NV(SliceOp.Annotations.SHARED_STATE, true)// ), queryBase, ctx); return left; }
/** * Impose an OFFSET and/or LIMIT on a query. */ private static final PipelineOp addSlice(PipelineOp left, final QueryBase queryBase, final SliceNode slice, final AST2BOpContext ctx) { final int bopId = ctx.nextId(); left = applyQueryHints(new SliceOp(leftOrEmpty(left),// new NV(SliceOp.Annotations.BOP_ID, bopId),// new NV(SliceOp.Annotations.OFFSET, slice.getOffset()),// new NV(SliceOp.Annotations.LIMIT, slice.getLimit()),// new NV(SliceOp.Annotations.EVALUATION_CONTEXT, BOpEvaluationContext.CONTROLLER),// new NV(SliceOp.Annotations.PIPELINED, true),// new NV(SliceOp.Annotations.MAX_PARALLEL, 1),// new NV(SliceOp.Annotations.REORDER_SOLUTIONS,false),// new NV(SliceOp.Annotations.SHARED_STATE, true)// ), queryBase, ctx); return left; }