private boolean evalBetaNode(LeftInputAdapterNode liaNode, PathMemory pmem, NetworkNode node, Memory nodeMem,
SegmentMemory[] smems, int smemIndex, LeftTupleSets trgTuples, InternalWorkingMemory wm,
LinkedList<StackEntry> stack, LinkedList<StackEntry> outerStack, Set<String> visitedRules, boolean processRian, RuleExecutor executor,
LeftTupleSets srcTuples, LeftTupleSets stagedLeftTuples, LeftTupleSinkNode sink) {
BetaNode betaNode = (BetaNode) node;
BetaMemory bm;
AccumulateMemory am = null;
if (NodeTypeEnums.AccumulateNode == node.getType()) {
am = (AccumulateMemory) nodeMem;
bm = am.getBetaMemory();
} else {
bm = (BetaMemory) nodeMem;
}
if (processRian && betaNode.isRightInputIsRiaNode()) {
// if the subnetwork is nested in this segment, it will create srcTuples containing
// peer LeftTuples, suitable for the node in the main path.
doRiaNode( wm, liaNode, pmem, srcTuples,
betaNode, sink, smems, smemIndex, nodeMem, bm, stack, outerStack, visitedRules, executor);
return true; // return here, doRiaNode queues the evaluation on the stack, which is necessary to handled nested query nodes