@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { ExprWalkerInfo ctx = (ExprWalkerInfo) procCtx; ctx.setIsCandidate((ExprNodeDesc) nd, true); return true; } }
@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { ExprWalkerInfo ctx = (ExprWalkerInfo) procCtx; ctx.setIsCandidate((ExprNodeDesc) nd, true); return true; } }
ctx.setIsCandidate(colref, false); return false; ctx.setIsCandidate(exp, true); ctx.addAlias(exp, colAlias[0]); } else { ctx.setIsCandidate(colref, true); return true;
@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { ExprWalkerInfo ctx = (ExprWalkerInfo) procCtx; String alias = null; ExprNodeFieldDesc expr = (ExprNodeFieldDesc) nd; boolean isCandidate = true; assert (nd.getChildren().size() == 1); ExprNodeDesc ch = (ExprNodeDesc) nd.getChildren().get(0); ExprNodeDesc newCh = ctx.getConvertedNode(ch); if (newCh != null) { expr.setDesc(newCh); ch = newCh; } String chAlias = ctx.getAlias(ch); isCandidate = isCandidate && ctx.isCandidate(ch); // need to iterate through all children even if one is found to be not a // candidate // in case if the other children could be individually pushed up if (isCandidate && chAlias != null) { if (alias == null) { alias = chAlias; } else if (!chAlias.equalsIgnoreCase(alias)) { isCandidate = false; } } ctx.addAlias(expr, alias); ctx.setIsCandidate(expr, isCandidate); return isCandidate; }
ctx.setIsCandidate(expr, false); ctx.setDeterministic(false); return false; ctx.setIsCandidate(expr, isCandidate); return isCandidate;
@Override public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { ExprWalkerInfo ctx = (ExprWalkerInfo) procCtx; String alias = null; ExprNodeFieldDesc expr = (ExprNodeFieldDesc) nd; boolean isCandidate = true; assert (nd.getChildren().size() == 1); ExprNodeDesc ch = (ExprNodeDesc) nd.getChildren().get(0); ExprNodeDesc newCh = ctx.getConvertedNode(ch); if (newCh != null) { expr.setDesc(newCh); ch = newCh; } String chAlias = ctx.getAlias(ch); isCandidate = isCandidate && ctx.isCandidate(ch); // need to iterate through all children even if one is found to be not a // candidate // in case if the other children could be individually pushed up if (isCandidate && chAlias != null) { if (alias == null) { alias = chAlias; } else if (!chAlias.equalsIgnoreCase(alias)) { isCandidate = false; } } ctx.addAlias(expr, alias); ctx.setIsCandidate(expr, isCandidate); return isCandidate; }
ctx.setIsCandidate(expr, false); ctx.setDeterministic(false); return false; ctx.setIsCandidate(expr, isCandidate); return isCandidate;
ctx.setIsCandidate(colref, false); return false; } else { ctx.setIsCandidate(exp, isCandidate); ctx.addAlias(exp, tabAlias); } else { ctx.setIsCandidate(colref, isCandidate); return isCandidate;