Package org.teiid.query.processor.relational

Examples of org.teiid.query.processor.relational.SortingFilter


    }
   
    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();
       
        // Add inputs
        for(int i=0; i<input.length; i++) {
            filter.addInputDirect(input[i], null);   
        }       
       
        Integer actual = (Integer) filter.getResult();
        assertEquals("Did not get expected number of results", expected, actual.intValue()); //$NON-NLS-1$
    }
View Full Code Here

TOP

Related Classes of org.teiid.query.processor.relational.SortingFilter

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.