Bug 1105117

Summary: Virtual procedure transformation not revalidated after changing parameter datatype
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Andrej Smigala <asmigala>
Component: ToolingAssignee: Van Halbert <vhalbert>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: dlesage, vhalbert
Target Milestone: ER2   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Changing the datatype of a virtual procedure parameter did not trigger revalidation. This means that errors caused by trying to convert the parameter to an incompatible datatype in the transformation would not disappear after fixing the datatype, and conversely, changing the datatype did not trigger validation errors when the new datatype was incompatible. To fix this, the T-form listener was modified to invalidate a t-root when a virtual parameter changed. As a result, virtual procedures are now re-validated after parameters are changed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-17 18:07:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrej Smigala 2014-06-05 12:31:07 UTC
Changing the datatype of a virtual procedure parameter does not trigger revalidation. This means that errors caused by trying to convert the parameter to an incompatible datatype in the transformation do not disappear after fixing the datatype, and conversely, changing the datatype does not trigger validation errors when the new datatype is incompatible.

Steps to reproduce:
1. Create new virtual procedure
2. Add a parameter p1 with datatype 'string'
3. Set the following transformation:
    CREATE VIRTUAL PROCEDURE BEGIN DECLARE xml VARIABLES.IN_P1 = p1; END
4. Save the model, an error is shown as expected (TEIID30082 Expected value of type 'xml' but 'p1' is of type 'string' and no implicit conversion is available.)
5. Change the datatype of the paramter to XMLLiteral
6. Validate the SQL, save the model, the error does not go away
7. Change the procedure to force revalidation (e.g. by adding DECLARE string VARIABLES.S = ''; to the procedure body)
8. Validate and save, the error disappears.
9. Change the datatype of the parameter back to string
10. Validate and save, no error appears
11. Change the procedure again, validate and save, the error appears again

Comment 1 JBoss JIRA Server 2014-07-08 21:11:56 UTC
Barry LaFond <blafond> updated the status of jira TEIIDDES-2198 to Resolved

Comment 2 JBoss JIRA Server 2014-11-17 16:25:41 UTC
Barry LaFond <blafond> updated the status of jira TEIIDDES-2198 to Closed