use of org.teiid.query.sql.symbol.AggregateSymbol in project teiid by teiid.
the class TestCapabilitiesUtil method testSupportsAggregate1.
// Test where capabilities don't support aggregate functions
@Test
public void testSupportsAggregate1() throws Exception {
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, false);
// $NON-NLS-1$
AggregateSymbol aggregate = new AggregateSymbol(NonReserved.COUNT, false, null);
helpTestSupportsAggregateFunction(caps, aggregate, false);
}
use of org.teiid.query.sql.symbol.AggregateSymbol in project teiid by teiid.
the class TestCapabilitiesUtil method testSupportsAggregate8.
// Test where capabilities support SUM
@Test
public void testSupportsAggregate8() throws Exception {
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_SUM, true);
// $NON-NLS-1$ //$NON-NLS-2$
AggregateSymbol aggregate = new AggregateSymbol(NonReserved.SUM, false, new ElementSymbol("x"));
helpTestSupportsAggregateFunction(caps, aggregate, true);
}
use of org.teiid.query.sql.symbol.AggregateSymbol in project teiid by teiid.
the class TestCapabilitiesUtil method testSupportsAggregate10.
// Test where capabilities support AVG
@Test
public void testSupportsAggregate10() throws Exception {
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_AVG, true);
// $NON-NLS-1$ //$NON-NLS-2$
AggregateSymbol aggregate = new AggregateSymbol(NonReserved.AVG, false, new ElementSymbol("x"));
helpTestSupportsAggregateFunction(caps, aggregate, true);
}
use of org.teiid.query.sql.symbol.AggregateSymbol in project teiid by teiid.
the class TestCapabilitiesUtil method testSupportsAggregate7.
// Test where capabilities don't support SUM
@Test
public void testSupportsAggregate7() throws Exception {
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_SUM, false);
// $NON-NLS-1$ //$NON-NLS-2$
AggregateSymbol aggregate = new AggregateSymbol(NonReserved.SUM, false, new ElementSymbol("x"));
helpTestSupportsAggregateFunction(caps, aggregate, false);
}
use of org.teiid.query.sql.symbol.AggregateSymbol in project teiid by teiid.
the class TestCapabilitiesUtil method testSupportsAggregate9.
// Test where capabilities don't support AVG
@Test
public void testSupportsAggregate9() throws Exception {
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_AVG, false);
// $NON-NLS-1$ //$NON-NLS-2$
AggregateSymbol aggregate = new AggregateSymbol(NonReserved.AVG, false, new ElementSymbol("x"));
helpTestSupportsAggregateFunction(caps, aggregate, false);
}
Aggregations