[
https://issues.jboss.org/browse/TEIIDDES-1098?page=com.atlassian.jira.plu...
]
Barry LaFond commented on TEIIDDES-1098:
----------------------------------------
As Steve explained, the SQL gets left in a invalid state.
3 options exist
1) Change the column/parameter name to the new name and add an "AS FOO" so the
Virtual table column name remains unchanged
2) Change the column/parameter name and edit/change the virtual column/parameter to
match. NOT RECOMMENDED: This could lead to recursive issues up the virtual model
dependency if models are layered AND could impact dependent tables
3) Do nothing and required the user to address each SQL error
We still don't have a clean/robust model object refactoring framework in Designer.
Being able to "preview" changes/effects would be paramount to help user choose
options on how to proceed.
Pushing to FUTURE
Name refactoring issues for parameters and columns
--------------------------------------------------
Key: TEIIDDES-1098
URL:
https://issues.jboss.org/browse/TEIIDDES-1098
Project: Teiid Designer
Issue Type: Bug
Components: Modeling
Affects Versions: 7.4.2
Reporter: Steven Hawkins
Assignee: Barry LaFond
Priority: Minor
Fix For: 7.7
I encountered a couple of issues when refactoring a procedure parameter name.
1. The procedure transformation sql is not updated with the new name. For example given
a procedure with a parameter param and a definition that just returns that value:
CREATE VIRTUAL PROCEDURE
BEGIN
SELECT param AS foo;
END
refactoring to param1 leaves the select as "select param as foo" rather than
updating to select param1 as foo. Note that if this is implemented, then aliases may need
to be added to, e.g. "select param" would become "select param1 as
param". There is existing logic in the Teiid ExpressionMappingVisitor to handle
that.
2. If you undo the refactoring of the name, then even after a save and rebuild the model
is still marked with an error. I had to edit the already valid SQL to clear the error.
Also tested with renaming a simple relational column with the same results/issues
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira