Uploaded image for project: 'Teiid Designer'
  1. Teiid Designer
  2. TEIIDDES-2697

Virtual procedure in generated dynamic VDB does not return result set

    XMLWordPrintable

Details

    Description

      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:

      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;
      

      Expected DDL:

      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;
      

      Attachments

        Issue Links

          Activity

            People

              blafond Barry LaFond
              asmigala@redhat.com Andrej Smigala
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: