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

Procedure input parameter has result in the generated DDL

XMLWordPrintable

      1. import project
      2. preview procedure

      I have a procedure with one input parameter. When I want to preview this procedure or deploy dynamic VDB, server shows me error that:

      TEIID31100 Parsing error: Encountered "(4000) [*]result[*]) RETURNS" at line 2, column 52.
      Procedure testProc RESULT param p1 must be of type OUT.
      

      I noticed that generated dynamic VDB contains 'result' in this parameter but this parameter has set direction to IN. When I delete the result from dynamic VDB, the procedure works fine.

      Actual DDL:

      CREATE VIRTUAL PROCEDURE testProc (p1 string(4000) result) RETURNS TABLE (xml_out xml) OPTIONS ("REST:METHOD" 'GET', "REST:URI" 'test/{p1}')
      	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) OPTIONS ("REST:METHOD" 'GET', "REST:URI" 'test/{p1}')
      	AS
       BEGIN
      	SELECT XMLELEMENT(NAME test, XMLFOREST(ProcedureModel.testProc.p1 AS elem1, 'elem2' AS elem2)) AS xml_out;
      END;
      

            blafond Barry LaFond
            mkralik@redhat.com Matej Kralik
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: