/** * Return the projected variables. */ public IVariable[] getProjectionVars() { final Set<IVariable<?>> vars = new LinkedHashSet<IVariable<?>>(); getProjectionVars(vars); // for (AssignmentNode n : this) { // // vars.add(n.getVar()); // // } return (IVariable[]) vars.toArray(new IVariable[vars.size()]); }
/** * Return the projected variables. */ public IVariable[] getProjectionVars() { final Set<IVariable<?>> vars = new LinkedHashSet<IVariable<?>>(); getProjectionVars(vars); // for (AssignmentNode n : this) { // // vars.add(n.getVar()); // // } return (IVariable[]) vars.toArray(new IVariable[vars.size()]); }
@Override public Set<IVariable<?>> getProjectedVars(final Set<IVariable<?>> vars) { final ProjectionNode tmp = getProjection(); if(tmp != null) { tmp.getProjectionVars(vars); } return vars; }
@Override public Set<IVariable<?>> getProjectedVars(final Set<IVariable<?>> vars) { final ProjectionNode tmp = getProjection(); if(tmp != null) { tmp.getProjectionVars(vars); } return vars; }
public Set<IVariable<?>> getProjectedVars(final Set<IVariable<?>> vars) { final ProjectionNode tmp = getProjection(); if(tmp != null) { tmp.getProjectionVars(vars); } return vars; }
public Set<IVariable<?>> getProjectedVars(final Set<IVariable<?>> vars) { final ProjectionNode tmp = getProjection(); if(tmp != null) { tmp.getProjectionVars(vars); } return vars; }
/** * Report the "MUST" and "MAYBE" bound bindings projected by the query. This * reduces to reporting the projected variables. We do not need to analyze * the whereClause or projection any further in order to know what "might" * be projected. */ // MAYBE : QueryBase public Set<IVariable<?>> getMaybeProducedBindings(final QueryBase node) { final Set<IVariable<?>> vars = new LinkedHashSet<IVariable<?>>(); final ProjectionNode projection = node.getProjection(); if(projection == null) { // If there is no projection then there is nothing to report. return vars; } return projection.getProjectionVars(vars); }
/** * Report the "MUST" and "MAYBE" bound bindings projected by the query. This * reduces to reporting the projected variables. We do not need to analyze * the whereClause or projection any further in order to know what "might" * be projected. */ // MAYBE : QueryBase public Set<IVariable<?>> getMaybeProducedBindings(final QueryBase node) { final Set<IVariable<?>> vars = new LinkedHashSet<IVariable<?>>(); final ProjectionNode projection = node.getProjection(); if(projection == null) { // If there is no projection then there is nothing to report. return vars; } return projection.getProjectionVars(vars); }
|| projection.isEmpty() ? null : projection.getProjectionVars();
|| projection.isEmpty() ? null : projection.getProjectionVars();
.getProjection().getProjectionVars();
.getProjection().getProjectionVars();
, optimizedQuery.getProjection().getProjectionVars()// );
, optimizedQuery.getProjection().getProjectionVars()// );
throw new AssertionError("Wildcard projection was not rewritten."); final IVariable<?>[] vars = projection.getProjectionVars();
.getProjection().getProjectionVars();
new NV(SubqueryOp.Annotations.JOIN_TYPE, JoinTypeEnum.Normal),// new NV(SubqueryOp.Annotations.ASK_VAR, askVar),// new NV(SubqueryOp.Annotations.SELECT, subqueryRoot.getProjection().getProjectionVars()),// new NV(SubqueryOp.Annotations.CONSTRAINTS, joinConstraints),// new NV(SubqueryOp.Annotations.IS_AGGREGATE, aggregate)//
new NV(SubqueryOp.Annotations.JOIN_TYPE, JoinTypeEnum.Normal),// new NV(SubqueryOp.Annotations.ASK_VAR, askVar),// new NV(SubqueryOp.Annotations.SELECT, subqueryRoot.getProjection().getProjectionVars()),// new NV(SubqueryOp.Annotations.CONSTRAINTS, joinConstraints),// new NV(SubqueryOp.Annotations.IS_AGGREGATE, aggregate)//
subqueryRoot.getProjection().getProjectionVars()!=null ? subqueryRoot.getProjection().getProjectionVars() : new IVariable[] {};
subqueryRoot.getProjection().getProjectionVars()!=null ? subqueryRoot.getProjection().getProjectionVars() : new IVariable[] {};