use of org.teiid.query.sql.symbol.AggregateSymbol in project teiid by teiid.
the class TestCapabilitiesUtil method testSupportsAggregate14.
// Test where capabilities support MAX
@Test
public void testSupportsAggregate14() throws Exception {
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, true);
// $NON-NLS-1$ //$NON-NLS-2$
AggregateSymbol aggregate = new AggregateSymbol(NonReserved.MAX, 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 testSupportsAggregate4.
// Test where capabilities support only COUNT(*)
@Test
public void testSupportsAggregate4() throws Exception {
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_COUNT, false);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_COUNT_STAR, true);
// $NON-NLS-1$ //$NON-NLS-2$
AggregateSymbol aggregate = new AggregateSymbol(NonReserved.COUNT, 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 testSupportsAggregate11.
// Test where capabilities don't support MIN
@Test
public void testSupportsAggregate11() throws Exception {
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MIN, false);
// $NON-NLS-1$ //$NON-NLS-2$
AggregateSymbol aggregate = new AggregateSymbol(NonReserved.MIN, 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 testSupportsAggregate13.
// Test where capabilities don't support MAX
@Test
public void testSupportsAggregate13() throws Exception {
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, false);
// $NON-NLS-1$ //$NON-NLS-2$
AggregateSymbol aggregate = new AggregateSymbol(NonReserved.MAX, 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 testSupportsAggregate12.
// Test where capabilities support MIN
@Test
public void testSupportsAggregate12() throws Exception {
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MIN, true);
// $NON-NLS-1$ //$NON-NLS-2$
AggregateSymbol aggregate = new AggregateSymbol(NonReserved.MIN, false, new ElementSymbol("x"));
helpTestSupportsAggregateFunction(caps, aggregate, true);
}
Aggregations