@Test public void testSelectAlias() { ElementSymbol x = new ElementSymbol("y.x"); ElementSymbol y = new ElementSymbol("z.X"); HashMap<Expression, Expression> map = new HashMap<Expression, Expression>(); map.put(x, y); LanguageObject toMap = new Select(Arrays.asList(x)); ExpressionMappingVisitor.mapExpressions(toMap, map); assertEquals("Did not get expected mapped expression", " z.X AS x", toMap.toString()); }
public static void mapExpressions(LanguageObject obj, Map<? extends Expression, ? extends Expression> exprMap) { mapExpressions(obj, exprMap, false); }
ExpressionMappingVisitor extends LanguageVisitor { public static void mapExpressions(LanguageObject obj, Map<? extends Expression, ? extends Expression> exprMap) { mapExpressions(obj, exprMap, false); } }
ExpressionMappingVisitor extends LanguageVisitor { public static void mapExpressions(LanguageObject obj, Map<? extends Expression, ? extends Expression> exprMap) { mapExpressions(obj, exprMap, false); } ExpressionMappingVisitor(Map symbolMap);  ExpressionMappingVisitor(Map symbolMap, boolean clone); }
ExpressionMappingVisitor extends LanguageVisitor { public static void mapExpressions(LanguageObject obj, Map<? extends Expression, ? extends Expression> exprMap) { mapExpressions(obj, exprMap, false); } ExpressionMappingVisitor(Map symbolMap);  ExpressionMappingVisitor(Map symbolMap, boolean clone); void visit(Select obj); boolean isClone(); void setClone(boolean clone); @Override void visit(DerivedColumn obj); @Override void visit(XMLTable obj); @Override void visit(JsonTable obj); @Override void visit(ObjectTable obj); @Override void visit(XMLSerialize obj); @Override void visit(XMLParse obj); void visit(AliasSymbol obj); void visit(ExpressionSymbol expr); void visit(BetweenCriteria obj); void visit(CaseExpression obj); void visit(CompareCriteria obj); void visit(Function obj); void visit(IsNullCriteria obj); void visit(MatchCriteria obj); void visit(SearchedCaseExpression obj); void visit(SetCriteria obj); void visit(DependentSetCriteria obj); void visit(SubqueryCompareCriteria obj); void visit(SubquerySetCriteria obj); Expression replaceExpression(Expression element); void visit(StoredProcedure obj); void visit(AggregateSymbol obj); void visit(GroupBy obj); @Override void visit(OrderByItem obj); void visit(Limit obj); void visit(DynamicCommand obj); void visit(SetClause obj); @Override void visit(QueryString obj); @Override void visit(ExpressionCriteria obj); static void mapExpressions(LanguageObject obj, Map<? extends Expression, ? extends Expression> exprMap); static void mapExpressions(LanguageObject obj, Map<? extends Expression, ? extends Expression> exprMap, boolean deep); void visit(AssignmentStatement obj); void visit(Insert obj); @Override void visit(XMLElement obj); @Override void visit(WindowSpecification windowSpecification); @Override void visit(Array array); @Override void visit(ExceptionExpression exceptionExpression); @Override void visit(ReturnStatement obj); @Override void visit(IsDistinctCriteria isDistinctCriteria); }
ExpressionMappingVisitor extends LanguageVisitor { public static void mapExpressions(LanguageObject obj, Map<? extends Expression, ? extends Expression> exprMap) { mapExpressions(obj, exprMap, false); } ExpressionMappingVisitor(Map symbolMap);  ExpressionMappingVisitor(Map symbolMap, boolean clone); void visit(Select obj); boolean isClone(); void setClone(boolean clone); @Override void visit(DerivedColumn obj); @Override void visit(XMLTable obj); @Override void visit(JsonTable obj); @Override void visit(ObjectTable obj); @Override void visit(XMLSerialize obj); @Override void visit(XMLParse obj); void visit(AliasSymbol obj); void visit(ExpressionSymbol expr); void visit(BetweenCriteria obj); void visit(CaseExpression obj); void visit(CompareCriteria obj); void visit(Function obj); void visit(IsNullCriteria obj); void visit(MatchCriteria obj); void visit(SearchedCaseExpression obj); void visit(SetCriteria obj); void visit(DependentSetCriteria obj); void visit(SubqueryCompareCriteria obj); void visit(SubquerySetCriteria obj); Expression replaceExpression(Expression element); void visit(StoredProcedure obj); void visit(AggregateSymbol obj); void visit(GroupBy obj); @Override void visit(OrderByItem obj); void visit(Limit obj); void visit(DynamicCommand obj); void visit(SetClause obj); @Override void visit(QueryString obj); @Override void visit(ExpressionCriteria obj); static void mapExpressions(LanguageObject obj, Map<? extends Expression, ? extends Expression> exprMap); static void mapExpressions(LanguageObject obj, Map<? extends Expression, ? extends Expression> exprMap, boolean deep); void visit(AssignmentStatement obj); void visit(Insert obj); @Override void visit(XMLElement obj); @Override void visit(WindowSpecification windowSpecification); @Override void visit(Array array); @Override void visit(ExceptionExpression exceptionExpression); @Override void visit(ReturnStatement obj); @Override void visit(IsDistinctCriteria isDistinctCriteria);  }