use of org.teiid.query.processor.FakeDataManager in project teiid by teiid.
the class TestProcedureProcessor method testReturnParamWithNoResultSetVirtual.
@Test
public void testReturnParamWithNoResultSetVirtual() throws Exception {
// $NON-NLS-1$
String sql = "EXEC TEIIDSP8(51)";
TransformationMetadata metadata = RealMetadataFactory.exampleBQTCached();
ProcessorPlan plan = getProcedurePlan(sql, metadata);
// Set up data
FakeDataManager dataMgr = new FakeDataManager();
// Create expected results
// $NON-NLS-1$
List[] expected = new List[] { Arrays.asList(51) };
helpTestProcess(plan, expected, dataMgr, metadata);
}
use of org.teiid.query.processor.FakeDataManager in project teiid by teiid.
the class TestProcedureProcessor method testVirtualProcedure2.
@Test
public void testVirtualProcedure2() throws Exception {
// $NON-NLS-1$
String userUpdateStr = "EXEC pm1.vsp3()";
QueryMetadataInterface metadata = RealMetadataFactory.example1Cached();
FakeDataManager dataMgr = exampleDataManager(metadata);
ProcessorPlan plan = getProcedurePlan(userUpdateStr, metadata);
// Create expected results
List[] expected = new List[] { // $NON-NLS-1$
Arrays.asList(new Object[] { "Third" }) };
helpTestProcess(plan, expected, dataMgr, metadata);
}
use of org.teiid.query.processor.FakeDataManager in project teiid by teiid.
the class TestProcedureProcessor method testJoinProcAndPhysicalModel.
@Test
public void testJoinProcAndPhysicalModel() throws Exception {
// $NON-NLS-1$
String userUpdateStr = "select a.e1 from (EXEC pm1.vsp46()) as a, pm1.g1 where a.e1=pm1.g1.e1";
QueryMetadataInterface metadata = RealMetadataFactory.example1Cached();
ProcessorPlan plan = getProcedurePlan(userUpdateStr, metadata);
// Set up data
FakeDataManager dataMgr = exampleDataManager(metadata);
// Create expected results
List[] expected = new List[] { // $NON-NLS-1$
Arrays.asList(new Object[] { "First" }), // $NON-NLS-1$
Arrays.asList(new Object[] { "Second" }), // $NON-NLS-1$
Arrays.asList(new Object[] { "Third" }) };
helpTestProcess(plan, expected, dataMgr, metadata);
}
use of org.teiid.query.processor.FakeDataManager in project teiid by teiid.
the class TestProcedureProcessor method testCase3521.
@Test
public void testCase3521() throws Exception {
// $NON-NLS-1$
String userUpdateStr = "EXEC pm1.vsp1()";
QueryMetadataInterface metadata = RealMetadataFactory.example1Cached();
FakeDataManager dataMgr = exampleDataManager(metadata);
ProcessorPlan plan = getProcedurePlan(userUpdateStr, metadata);
// Create expected results
List[] expected = new List[] { // $NON-NLS-1$
Arrays.asList(new Object[] { "Second" }) // Arrays.asList(new Object[] { "Third"}), //$NON-NLS-1$
};
helpTestProcess(plan, expected, dataMgr, metadata);
}
use of org.teiid.query.processor.FakeDataManager in project teiid by teiid.
the class TestProcedureProcessor method testVirtualProcedureWithCreateAndSelectInto.
@Test
public void testVirtualProcedureWithCreateAndSelectInto() throws Exception {
// $NON-NLS-1$
String userUpdateStr = "EXEC pm1.vsp62()";
QueryMetadataInterface metadata = RealMetadataFactory.example1Cached();
FakeDataManager dataMgr = exampleDataManager(metadata);
ProcessorPlan plan = getProcedurePlan(userUpdateStr, metadata);
// Create expected results
List[] expected = new List[] { // $NON-NLS-1$
Arrays.asList(new Object[] { "First" }), // $NON-NLS-1$
Arrays.asList(new Object[] { "Second" }), // $NON-NLS-1$
Arrays.asList(new Object[] { "Third" }) };
helpTestProcess(plan, expected, dataMgr, metadata);
}
Aggregations