Search in sources :

Example 6 with AggregateSymbol

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

the class TestAggregateSymbol method testEquals2.

public void testEquals2() {
    // $NON-NLS-1$
    AggregateSymbol as1 = new AggregateSymbol(NonReserved.COUNT, true, sampleElement());
    AggregateSymbol as2 = (AggregateSymbol) as1.clone();
    helpEquals(as1, as2, true);
}
Also used : AggregateSymbol(org.teiid.query.sql.symbol.AggregateSymbol)

Example 7 with AggregateSymbol

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

the class TestAggregateSymbol method testEquals4.

public void testEquals4() {
    // $NON-NLS-1$
    AggregateSymbol as1 = new AggregateSymbol(NonReserved.COUNT, false, null);
    AggregateSymbol as2 = (AggregateSymbol) as1.clone();
    helpEquals(as1, as2, true);
}
Also used : AggregateSymbol(org.teiid.query.sql.symbol.AggregateSymbol)

Example 8 with AggregateSymbol

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

the class TestAggregateSymbol method testParser5.

public void testParser5() {
    // $NON-NLS-1$
    AggregateSymbol as = new AggregateSymbol(NonReserved.COUNT, false, null);
    // $NON-NLS-1$
    helpParser(as, "COUNT(*)");
}
Also used : AggregateSymbol(org.teiid.query.sql.symbol.AggregateSymbol)

Example 9 with AggregateSymbol

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

the class TestAggregateSymbol method testNonEquivalence2.

public void testNonEquivalence2() {
    // $NON-NLS-1$
    AggregateSymbol test1 = new AggregateSymbol(NonReserved.MAX, true, sampleElement());
    // $NON-NLS-1$
    AggregateSymbol test2 = new AggregateSymbol(NonReserved.COUNT, true, sampleElement2());
    int equals = -1;
    UnitTestUtil.helpTestEquivalence(equals, test1, test2);
}
Also used : AggregateSymbol(org.teiid.query.sql.symbol.AggregateSymbol)

Example 10 with AggregateSymbol

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

the class TestAggregateSymbol method testParser1.

// ################################## ACTUAL TESTS ################################
public void testParser1() {
    // $NON-NLS-1$
    AggregateSymbol as = new AggregateSymbol(NonReserved.COUNT, false, sampleElement());
    // $NON-NLS-1$
    helpParser(as, "COUNT(m.g.c)");
}
Also used : AggregateSymbol(org.teiid.query.sql.symbol.AggregateSymbol)

Aggregations

AggregateSymbol (org.teiid.query.sql.symbol.AggregateSymbol)53 ElementSymbol (org.teiid.query.sql.symbol.ElementSymbol)27 Test (org.junit.Test)21 BasicSourceCapabilities (org.teiid.query.optimizer.capabilities.BasicSourceCapabilities)16 ArrayList (java.util.ArrayList)12 List (java.util.List)11 Expression (org.teiid.query.sql.symbol.Expression)9 OrderBy (org.teiid.query.sql.lang.OrderBy)8 CommandContext (org.teiid.query.util.CommandContext)6 BufferManager (org.teiid.common.buffer.BufferManager)5 SymbolMap (org.teiid.query.sql.util.SymbolMap)5 BigDecimal (java.math.BigDecimal)4 FakeTupleSource (org.teiid.query.processor.FakeTupleSource)4 Constant (org.teiid.query.sql.symbol.Constant)4 TeiidRuntimeException (org.teiid.core.TeiidRuntimeException)3 PlanNode (org.teiid.query.optimizer.relational.plantree.PlanNode)3 AliasSymbol (org.teiid.query.sql.symbol.AliasSymbol)3 ExpressionSymbol (org.teiid.query.sql.symbol.ExpressionSymbol)3 Map (java.util.Map)2 AggregateFunction (org.teiid.query.function.aggregate.AggregateFunction)2