&& !tmp[0].equals(columnDesc.getTabAlias()) && tcCtx.getOuterRR() != null) { tmp = tcCtx.getOuterRR().reverseLookup(columnDesc.getColumn());
&& !tmp[0].equals(columnDesc.getTabAlias()) && tcCtx.getOuterRR() != null) { tmp = tcCtx.getOuterRR().reverseLookup(columnDesc.getColumn());
protected ExprNodeDesc processQualifiedColRef(TypeCheckCtx ctx, ASTNode expr, Object... nodeOutputs) throws SemanticException { RowResolver input = ctx.getInputRR(); String tableAlias = BaseSemanticAnalyzer.unescapeIdentifier(expr.getChild(0).getChild(0) .getText()); // NOTE: tableAlias must be a valid non-ambiguous table alias, // because we've checked that in TOK_TABLE_OR_COL's process method. String colName; if (nodeOutputs[1] instanceof ExprNodeConstantDesc) { colName = ((ExprNodeConstantDesc) nodeOutputs[1]).getValue().toString(); } else if (nodeOutputs[1] instanceof ExprNodeColumnDesc) { colName = ((ExprNodeColumnDesc)nodeOutputs[1]).getColumn(); } else { throw new SemanticException("Unexpected ExprNode : " + nodeOutputs[1]); } ColumnInfo colInfo = input.get(tableAlias, colName); // Try outer Row resolver if(colInfo == null && ctx.getOuterRR() != null) { RowResolver outerRR = ctx.getOuterRR(); colInfo = outerRR.get(tableAlias, colName); } if (colInfo == null) { ctx.setError(ErrorMsg.INVALID_COLUMN.getMsg(expr.getChild(1)), expr); return null; } return toExprNodeDesc(colInfo); }
protected ExprNodeDesc processQualifiedColRef(TypeCheckCtx ctx, ASTNode expr, Object... nodeOutputs) throws SemanticException { RowResolver input = ctx.getInputRR(); String tableAlias = BaseSemanticAnalyzer.unescapeIdentifier(expr.getChild(0).getChild(0) .getText()); // NOTE: tableAlias must be a valid non-ambiguous table alias, // because we've checked that in TOK_TABLE_OR_COL's process method. String colName; if (nodeOutputs[1] instanceof ExprNodeConstantDesc) { colName = ((ExprNodeConstantDesc) nodeOutputs[1]).getValue().toString(); } else if (nodeOutputs[1] instanceof ExprNodeColumnDesc) { colName = ((ExprNodeColumnDesc)nodeOutputs[1]).getColumn(); } else { throw new SemanticException("Unexpected ExprNode : " + nodeOutputs[1]); } ColumnInfo colInfo = input.get(tableAlias, colName); // Try outer Row resolver if(colInfo == null && ctx.getOuterRR() != null) { RowResolver outerRR = ctx.getOuterRR(); colInfo = outerRR.get(tableAlias, colName); } if (colInfo == null) { ctx.setError(ErrorMsg.INVALID_COLUMN.getMsg(expr.getChild(1)), expr); return null; } return toExprNodeDesc(colInfo); }
if(ctx.getOuterRR() != null && colInfo == null && !isTableAlias) { RowResolver outerRR = ctx.getOuterRR(); isTableAlias = outerRR.hasTableAlias(tableOrCol); colInfo = outerRR.get(null, tableOrCol);
if (!ctx.isUseCaching() && ctx.getOuterRR() == null) { return null; RowResolver outerRR = ctx.getOuterRR(); if(colInfo == null && outerRR != null) { colInfo = outerRR.getExpression(expr);
if (!ctx.isUseCaching() && ctx.getOuterRR() == null) { return null; RowResolver outerRR = ctx.getOuterRR(); if(colInfo == null && outerRR != null) { colInfo = outerRR.getExpression(expr);
if(ctx.getOuterRR() != null && colInfo == null && !isTableAlias) { RowResolver outerRR = ctx.getOuterRR(); isTableAlias = outerRR.hasTableAlias(tableOrCol); colInfo = outerRR.get(null, tableOrCol);