]
RH Bugzilla Integration commented on TEIIDDES-2697:
---------------------------------------------------
Barry LaFond <blafond(a)redhat.com> changed the Status of [bug
Virtual procedure in generated dynamic VDB does not return result
set
---------------------------------------------------------------------
Key: TEIIDDES-2697
URL:
https://issues.jboss.org/browse/TEIIDDES-2697
Project: Teiid Designer
Issue Type: Bug
Components: VDB & Execution
Affects Versions: 9.0.4
Reporter: Andrej Šmigala
Assignee: Barry LaFond
Fix For: 9.2
Attachments: DynamicProcedureProject.zip
When a VDB containing view model with a virtual procedure is exported as a dynamic VDB,
the virtual procedure does not return any results. This is because the generated DDL does
not contain the RETURNS clause.
Generated DDL:
{code:sql}
CREATE VIRTUAL PROCEDURE testProc (p1 string(4000))
AS
BEGIN
SELECT XMLELEMENT(NAME test, XMLFOREST(ProcedureModel.testProc.p1 AS elem1,
'elem2' AS elem2)) AS xml_out;
END;
{code}
Expected DDL:
{code:sql}
CREATE VIRTUAL PROCEDURE testProc (p1 string(4000)) RETURNS TABLE ( xml_out xml)
AS
BEGIN
SELECT XMLELEMENT(NAME test, XMLFOREST(ProcedureModel.testProc.p1 AS elem1,
'elem2' AS elem2)) AS xml_out;
END;
{code}