Package org.teiid.query.metadata

Examples of org.teiid.query.metadata.QueryMetadataInterface


   
    /**
     *  usesKey false
     */
    @Test public void testEstimateCostOfCriteriaMultiGroup3() throws Exception {
        QueryMetadataInterface metadata = FakeMetadataFactory.example4();
        String critString = "pm2.g3.e1 = pm4.g1.e1"; //$NON-NLS-1$
       
        helpTestEstimateCost(critString, 100, 33, metadata);
    }
View Full Code Here


    /**
     *  Date Criteria - Case using valid max and min date strings.  In the case of date,
     *  the valid strings are timestamp format - since that is what our costing sets them as.
     */
    @Test public void testEstimateCostOfCriteriaDate1() throws Exception {
        QueryMetadataInterface metadata = FakeMetadataFactory.example1();
        FakeMetadataObject e2 = (FakeMetadataObject)metadata.getElementID("pm3.g1.e2"); //$NON-NLS-1$
        e2.putProperty(FakeMetadataObject.Props.MIN_VALUE,"2007-04-03 12:12:12.10"); //$NON-NLS-1$
        e2.putProperty(FakeMetadataObject.Props.MAX_VALUE,"2007-06-03 12:12:12.10"); //$NON-NLS-1$
        String critString = "pm3.g1.e2 <= {d'2008-04-03'}"; //$NON-NLS-1$
       
        helpTestEstimateCost(critString, 100, 100, metadata);
View Full Code Here

    /**
     *  Date Criteria - Case using invalid max and min date strings.  In the case of date,
     *  one example of invalid strings is date format - since our costing sets them to timestamp.
     */
    @Test public void testEstimateCostOfCriteriaDate2() throws Exception {
        QueryMetadataInterface metadata = FakeMetadataFactory.example1();
        FakeMetadataObject e2 = (FakeMetadataObject)metadata.getElementID("pm3.g1.e2"); //$NON-NLS-1$
        e2.putProperty(FakeMetadataObject.Props.MIN_VALUE,"2007-04-03"); //$NON-NLS-1$
        e2.putProperty(FakeMetadataObject.Props.MAX_VALUE,"2007-06-03"); //$NON-NLS-1$
        String critString = "pm3.g1.e2 <= {d'2008-04-03'}"; //$NON-NLS-1$
       
        helpTestEstimateCost(critString, 100, 33, metadata);
View Full Code Here

    /**
     *  Time Criteria - case using valid max and min time strings.
     */
    @Test public void testEstimateCostOfCriteriaTime1() throws Exception {
        QueryMetadataInterface metadata = FakeMetadataFactory.example1();
        FakeMetadataObject e3 = (FakeMetadataObject)metadata.getElementID("pm3.g1.e3"); //$NON-NLS-1$
        e3.putProperty(FakeMetadataObject.Props.MIN_VALUE,"12:12:12"); //$NON-NLS-1$
        e3.putProperty(FakeMetadataObject.Props.MAX_VALUE,"12:13:14"); //$NON-NLS-1$
        String critString = "pm3.g1.e3 <= {t'11:11:11'}"; //$NON-NLS-1$
       
        helpTestEstimateCost(critString, 100, 1, metadata);
View Full Code Here

    /**
     *  Time Criteria - case using invalid max and min time strings
     */
    @Test public void testEstimateCostOfCriteriaTime2() throws Exception {
        QueryMetadataInterface metadata = FakeMetadataFactory.example1();
        FakeMetadataObject e3 = (FakeMetadataObject)metadata.getElementID("pm3.g1.e3"); //$NON-NLS-1$
        e3.putProperty(FakeMetadataObject.Props.MIN_VALUE,"2007-04-03 12:12:12.10"); //$NON-NLS-1$
        e3.putProperty(FakeMetadataObject.Props.MAX_VALUE,"2007-06-03 12:12:12.10"); //$NON-NLS-1$
        String critString = "pm3.g1.e3 <= {t'11:11:11'}"; //$NON-NLS-1$
       
        helpTestEstimateCost(critString, 100, 33, metadata);
View Full Code Here

   
    /**
     *  Timestamp Criteria - case using valid max and min timestamp strings
     */
    @Test public void testEstimateCostOfCriteriaTimestamp1() throws Exception {
        QueryMetadataInterface metadata = FakeMetadataFactory.example1();
        FakeMetadataObject e4 = (FakeMetadataObject)metadata.getElementID("pm3.g1.e4"); //$NON-NLS-1$
        e4.putProperty(FakeMetadataObject.Props.MIN_VALUE,"2007-04-03 12:12:12.10"); //$NON-NLS-1$
        e4.putProperty(FakeMetadataObject.Props.MAX_VALUE,"2007-04-03 12:12:12.10"); //$NON-NLS-1$
        String critString = "pm3.g1.e4 <= {ts'2007-04-03 12:12:12.10'}"; //$NON-NLS-1$
       
        helpTestEstimateCost(critString, 100, 1, metadata);
View Full Code Here

    /**
     *  Timestamp Criteria - case using invalid max and min timestamp strings
     */
    @Test public void testEstimateCostOfCriteriaTimestamp2() throws Exception {
        QueryMetadataInterface metadata = FakeMetadataFactory.example1();
        FakeMetadataObject e4 = (FakeMetadataObject)metadata.getElementID("pm3.g1.e4"); //$NON-NLS-1$
        e4.putProperty(FakeMetadataObject.Props.MIN_VALUE,"2007-04-03"); //$NON-NLS-1$
        e4.putProperty(FakeMetadataObject.Props.MAX_VALUE,"2007-06-03"); //$NON-NLS-1$
        String critString = "pm3.g1.e4 <= {ts'2007-04-03 12:12:12.10'}"; //$NON-NLS-1$
       
        helpTestEstimateCost(critString, 100, 33, metadata);
View Full Code Here

    public void test4() throws Exception {
        helpPlan("SELECT * FROM vm1.doc3", example1()); //$NON-NLS-1$
    }

    public void testTempGroupPlan() throws Exception {
        QueryMetadataInterface qmi = example1();
       
        XMLPlan plan = helpPlan("SELECT * FROM vm1.doc6", qmi); //$NON-NLS-1$
       
        Program program = plan.getOriginalProgram();

View Full Code Here

            }
        }
    }

    public void testDefect18227() throws Exception {
        QueryMetadataInterface metadata = example1();      
        String sql = "select * from vm1.docWithAttribute3 where root.@type = '3'"; //$NON-NLS-1$
       
        Query query = (Query)TestXMLProcessor.helpGetCommand(sql, metadata);
       
        try {
View Full Code Here

            // Expect to get exception about criteria against xsi:type
        }
    }
   
    public void testDefect21983() throws Exception {
        QueryMetadataInterface metadata = example1();      
        String sql = "select root.@type from vm1.docWithAttribute3"; //$NON-NLS-1$
       
        Query query = (Query)TestXMLProcessor.helpGetCommand(sql, metadata);

        //here's the test
View Full Code Here

TOP

Related Classes of org.teiid.query.metadata.QueryMetadataInterface

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.