if (qb.exists(alias)) { throw new SemanticException(ErrorMsg.AMBIGUOUS_TABLE_ALIAS.getMsg(tabref .getChild(aliasIndex)));
if (qb.exists(alias)) { throw new SemanticException(ErrorMsg.AMBIGUOUS_TABLE_ALIAS.getMsg(tabref .getChild(aliasIndex)));
private String processSubQuery(QB qb, ASTNode subq) throws SemanticException { // This is a subquery and must have an alias if (subq.getChildCount() != 2) { throw new SemanticException(ErrorMsg.NO_SUBQUERY_ALIAS.getMsg(subq)); } ASTNode subqref = (ASTNode) subq.getChild(0); String alias = unescapeIdentifier(subq.getChild(1).getText()); // Recursively do the first phase of semantic analysis for the subquery QBExpr qbexpr = new QBExpr(alias); doPhase1QBExpr(subqref, qbexpr, qb.getId(), alias, qb.isInsideView()); // If the alias is already there then we have a conflict if (qb.exists(alias)) { throw new SemanticException(ErrorMsg.AMBIGUOUS_TABLE_ALIAS.getMsg(subq .getChild(1))); } // Insert this map into the stats qb.setSubqAlias(alias, qbexpr); qb.addAlias(alias); unparseTranslator.addIdentifierTranslation((ASTNode) subq.getChild(1)); return alias; }
private String processSubQuery(QB qb, ASTNode subq) throws SemanticException { // This is a subquery and must have an alias if (subq.getChildCount() != 2) { throw new SemanticException(ErrorMsg.NO_SUBQUERY_ALIAS.getMsg(subq)); } ASTNode subqref = (ASTNode) subq.getChild(0); String alias = unescapeIdentifier(subq.getChild(1).getText()); // Recursively do the first phase of semantic analysis for the subquery QBExpr qbexpr = new QBExpr(alias); doPhase1QBExpr(subqref, qbexpr, qb.getId(), alias, qb.isInsideView()); // If the alias is already there then we have a conflict if (qb.exists(alias)) { throw new SemanticException(ErrorMsg.AMBIGUOUS_TABLE_ALIAS.getMsg(subq .getChild(1))); } // Insert this map into the stats qb.setSubqAlias(alias, qbexpr); qb.addAlias(alias); unparseTranslator.addIdentifierTranslation((ASTNode) subq.getChild(1)); return alias; }
private String processSubQuery(QB qb, ASTNode subq) throws SemanticException { // This is a subquery and must have an alias if (subq.getChildCount() != 2) { throw new SemanticException(ErrorMsg.NO_SUBQUERY_ALIAS.getMsg(subq)); } ASTNode subqref = (ASTNode) subq.getChild(0); String alias = unescapeIdentifier(subq.getChild(1).getText()); // Recursively do the first phase of semantic analysis for the subquery QBExpr qbexpr = new QBExpr(alias); doPhase1QBExpr(subqref, qbexpr, qb.getId(), alias); // If the alias is already there then we have a conflict if (qb.exists(alias)) { throw new SemanticException(ErrorMsg.AMBIGUOUS_TABLE_ALIAS.getMsg(subq .getChild(1))); } // Insert this map into the stats qb.setSubqAlias(alias, qbexpr); qb.addAlias(alias); unparseTranslator.addIdentifierTranslation((ASTNode) subq.getChild(1)); return alias; }
private String processSubQuery(QB qb, ASTNode subq) throws SemanticException { // This is a subquery and must have an alias if (subq.getChildCount() != 2) { throw new SemanticException(ErrorMsg.NO_SUBQUERY_ALIAS.getMsg(subq)); } ASTNode subqref = (ASTNode) subq.getChild(0); String alias = unescapeIdentifier(subq.getChild(1).getText()); // Recursively do the first phase of semantic analysis for the subquery QBExpr qbexpr = new QBExpr(alias); doPhase1QBExpr(subqref, qbexpr, qb.getId(), alias); // If the alias is already there then we have a conflict if (qb.exists(alias)) { throw new SemanticException(ErrorMsg.AMBIGUOUS_TABLE_ALIAS.getMsg(subq .getChild(1))); } // Insert this map into the stats qb.setSubqAlias(alias, qbexpr); qb.addAlias(alias); unparseTranslator.addIdentifierTranslation((ASTNode) subq.getChild(1)); return alias; }
if (qb.exists(alias)) { throw new SemanticException(ErrorMsg.AMBIGUOUS_TABLE_ALIAS.getMsg(tabref .getChild(aliasIndex)));
if (qb.exists(alias)) { throw new SemanticException(ErrorMsg.AMBIGUOUS_TABLE_ALIAS.getMsg(tabref .getChild(aliasIndex)));