Package org.teiid.query.optimizer.capabilities

Examples of org.teiid.query.optimizer.capabilities.DefaultCapabilitiesFinder


     
        List[] expected = new List[] {
            Arrays.asList(ObjectConverterUtil.convertToString(new FileInputStream(UnitTestUtil.getTestDataFile("udf.xmi")))),
        };   
   
        processPreparedStatement(sql, expected, dataManager, new DefaultCapabilitiesFinder(), FakeMetadataFactory.example1Cached(), Arrays.asList(TestTextTable.clobFromFile("udf.xmi")));
    }
View Full Code Here


     
        List[] expected = new List[] {
            Arrays.asList(ObjectConverterUtil.convertToString(new FileInputStream(UnitTestUtil.getTestDataFile("udf.xmi")))),
        };   
   
        processPreparedStatement(sql, expected, dataManager, new DefaultCapabilitiesFinder(), FakeMetadataFactory.example1Cached(), Arrays.asList(blobFromFile("udf.xmi")));
    }
View Full Code Here

     
        List[] expected = new List[] {
            Arrays.asList(ObjectConverterUtil.convertToString(new InputStreamReader(new FileInputStream(UnitTestUtil.getTestDataFile("encoding.xml")), Charset.forName("ISO-8859-1")))),
        };   
   
        processPreparedStatement(sql, expected, dataManager, new DefaultCapabilitiesFinder(), FakeMetadataFactory.example1Cached(), Arrays.asList(blobFromFile("encoding.xml")));
    }
View Full Code Here

    @AfterClass public static void oneTimeTearDown() {
      TimestampWithTimezone.resetCalendar(null); //$NON-NLS-1$
    }
   
  private void process(String sql, List<?>[] expected) throws Exception {
        ProcessorPlan plan = helpGetPlan(helpParse(sql), FakeMetadataFactory.example1Cached(), new DefaultCapabilitiesFinder(), createCommandContext());
       
        helpProcess(plan, createCommandContext(), dataManager, expected);
  }
View Full Code Here

        // Set up metadata
        FakeMetadataFacade metadata = FakeMetadataFactory.example1Cached();
        FakeMetadataObject modelID = metadata.getStore().findObject("pm1", FakeMetadataObject.MODEL); //$NON-NLS-1$
       
        // Test capabilities util
        boolean actual = CapabilitiesUtil.supportsSelfJoins(modelID, metadata, new DefaultCapabilitiesFinder());
        assertEquals("Got wrong answer for supports", false, actual); //$NON-NLS-1$
    }
View Full Code Here

        userCommand = QueryRewriter.rewrite(userCommand, metadata, null);
       
        AnalysisRecord analysisRecord = new AnalysisRecord(false, DEBUG);
       
        try {
            return QueryOptimizer.optimizePlan(userCommand, metadata, null, new DefaultCapabilitiesFinder(), analysisRecord, null);
        } finally {
            if(DEBUG) {
                System.out.println(analysisRecord.getDebugLog());
            }
        }       
View Full Code Here

        return helpTestProcess(sql, expectedDoc, metadata, dataMgr, null);
    }

    static ProcessorPlan helpTestProcess(String sql, String expectedDoc, FakeMetadataFacade metadata, FakeDataManager dataMgr, Class expectedException) throws Exception{

        return helpTestProcess(sql, metadata, dataMgr, expectedException, new DefaultCapabilitiesFinder(), expectedDoc);
    }
View Full Code Here

    @Test public void testWithNewIter3PropertiesException() throws Exception {
        FakeMetadataFacade metadata = exampleMetadataCached();
        FakeDataManager dataMgr = exampleDataManagerDuJour(metadata);
       
        Command command = helpGetCommand("SELECT * FROM xmltest.doc6", metadata); //$NON-NLS-1$
        XMLPlan plan = TestXMLPlanner.preparePlan(command, metadata, new DefaultCapabilitiesFinder(), null);

        BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
        CommandContext context = new CommandContext("pID", null, null, null, 1);                                 //$NON-NLS-1$
        QueryProcessor processor = new QueryProcessor(plan, context, bufferMgr, dataMgr);
        processor.setNonBlocking(true);
View Full Code Here

            "        </Supplier>\r\n" + //$NON-NLS-1$
            "    </Suppliers>\r\n" + //$NON-NLS-1$
            "</Item>\r\n\r\n"; //$NON-NLS-1$


        helpTestProcess("SELECT * FROM xmltest.doc11", metadata, dataMgr, null, new DefaultCapabilitiesFinder(), expectedDoc1, expectedDoc2, expectedDoc3);         //$NON-NLS-1$
    }
View Full Code Here

        BasicSourceCapabilities caps = new BasicSourceCapabilities();
        caps.setCapabilitySupport(Capability.QUERY_SUBQUERIES_CORRELATED, true);
        caps.setCapabilitySupport(Capability.QUERY_SUBQUERIES_SCALAR, true);
        caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
        caps.setFunctionSupport("convert", true); //$NON-NLS-1$
        CapabilitiesFinder capFinder = new DefaultCapabilitiesFinder(caps);
       
        helpTestProcess("SELECT * FROM xmltest.doc12260", metadata, dataMgr, null, capFinder, expectedDoc); //$NON-NLS-1$
    }
View Full Code Here

TOP

Related Classes of org.teiid.query.optimizer.capabilities.DefaultCapabilitiesFinder

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.