[
https://issues.jboss.org/browse/TEIIDDES-2697?page=com.atlassian.jira.plu...
]
Andrej Šmigala reopened TEIIDDES-2697:
--------------------------------------
I tested this with 9.2 and the DDL is now
{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 c1, 'c2' AS
c2)) AS xml_out;
END;
{code}
Note the extra closing brace in the returns clause.
The same problem occurs with scalar return values, e.g.
{code:sql}
CREATE VIRTUAL FUNCTION udfConcatNull (stringLeft string(4000), stringRight string(4000),
concatenatedResult string(4000)) RETURNS string
) OPTIONS("FUNCTION-CATEGORY" 'MY_TESTING_FUNCTION_CATEGORY', JAVA_CLASS
'userdefinedfunctions.MyConcatNull', JAVA_METHOD 'myConcatNull')
{code}
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}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)