Search in sources :

Example 16 with ExpressionSymbol

use of org.teiid.query.sql.symbol.ExpressionSymbol in project teiid by teiid.

the class TestExpressionSymbol method testExpressionHashCode.

public void testExpressionHashCode() {
    Expression expr1 = new Constant(new Integer(1));
    Expression expr2 = new Constant(new Integer(2));
    // $NON-NLS-1$
    ExpressionSymbol symbol1 = new ExpressionSymbol("foo", expr1);
    // $NON-NLS-1$
    ExpressionSymbol symbol2 = new ExpressionSymbol("bar", expr2);
    assertFalse(symbol1.hashCode() == symbol2.hashCode());
}
Also used : Expression(org.teiid.query.sql.symbol.Expression) Constant(org.teiid.query.sql.symbol.Constant) ExpressionSymbol(org.teiid.query.sql.symbol.ExpressionSymbol)

Aggregations

ExpressionSymbol (org.teiid.query.sql.symbol.ExpressionSymbol)16 Constant (org.teiid.query.sql.symbol.Constant)10 Expression (org.teiid.query.sql.symbol.Expression)9 ElementSymbol (org.teiid.query.sql.symbol.ElementSymbol)8 ArrayList (java.util.ArrayList)7 List (java.util.List)7 Test (org.junit.Test)6 AliasSymbol (org.teiid.query.sql.symbol.AliasSymbol)5 Function (org.teiid.query.sql.symbol.Function)5 PlanNode (org.teiid.query.optimizer.relational.plantree.PlanNode)4 LinkedHashSet (java.util.LinkedHashSet)3 FunctionDescriptor (org.teiid.query.function.FunctionDescriptor)3 OrderBy (org.teiid.query.sql.lang.OrderBy)3 AggregateSymbol (org.teiid.query.sql.symbol.AggregateSymbol)3 Map (java.util.Map)2 WindowFunction (org.teiid.query.sql.symbol.WindowFunction)2 SymbolMap (org.teiid.query.sql.util.SymbolMap)2 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 LinkedList (java.util.LinkedList)1