//this is a gross hack, these should not be criteria
if (planRowLimitFunction(conjunct, criteria, planEnv)) {
continue;
}
MappingNode context = null;
Collection contextFunctions = ContextReplacerVisitor.replaceContextFunctions(conjunct);
if (!contextFunctions.isEmpty()) {
//ensure that every part of the conjunct is to the same context
for (Iterator i = contextFunctions.iterator(); i.hasNext();) {
Function contextFunction = (Function)i.next();
MappingNode otherContext = getContext(planEnv, contextFunction);
if (context == null) {
context = otherContext;
} else if (context != otherContext){
throw new QueryPlannerException("ERR.015.004.0068", QueryPlugin.Util.getString("ERR.015.004.0068", criteria)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
//search up to find the source node
MappingNode contextRsNode = context.getSourceNode();
if (contextRsNode != null) {
context = contextRsNode;
}
} else {