Package org.teiid.query.function.aggregate

Examples of org.teiid.query.function.aggregate.Count


    }
   
    public void helpTestDuplicateFilter(Object[] input, Class dataType, int expected) throws TeiidComponentException, TeiidProcessingException {
        BufferManager mgr = BufferManagerFactory.getStandaloneBufferManager();
       
        SortingFilter filter = new SortingFilter(new Count(), mgr, "test", true); //$NON-NLS-1$
        filter.initialize(dataType, dataType);
        ElementSymbol element = new ElementSymbol("val"); //$NON-NLS-1$
        element.setType(dataType);
        filter.setElements(Arrays.asList(element));
        filter.reset();
View Full Code Here


            Class<?> inputType = symbol.getType();
            if(symbol instanceof AggregateSymbol) {
                AggregateSymbol aggSymbol = (AggregateSymbol) symbol;
               
                if(aggSymbol.getExpression() == null) {
                    functions[i] = new Count();
                } else {
                  Expression ex = aggSymbol.getExpression();
                  inputType = ex.getType();
                  int index = collectExpression(ex);
                  Type function = aggSymbol.getAggregateFunction();
                  switch (function) {
                  case COUNT:
                    functions[i] = new Count();
                    break;
                  case SUM:
                    functions[i] = new Sum();
                    break;
                  case AVG:
View Full Code Here

TOP

Related Classes of org.teiid.query.function.aggregate.Count

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.