[
https://issues.jboss.org/browse/TEIIDDES-1623?page=com.atlassian.jira.plu...
]
Barry LaFond commented on TEIIDDES-1623:
----------------------------------------
Fix is to insert the following if/else statement into
*DisplayNodeFactory.constructDisplayNode()* method anywhere before the "instanceof
LanguageObject" if check ...
7.7.x
{code}
else if( parentNode instanceof FunctionDisplayNode && obj instanceof Constant
&& ((Constant)obj).getValue() != null ) {
return new TextDisplayNode(parentNode, obj.toString());
}
{code}
8.1 Designer is a little different due to the multi-server SPI abstraction layer (i.e.
IConstant vs Constant)
{code}
else if( parentNode instanceof FunctionDisplayNode && obj instanceof IConstant
&& ((IConstant)obj).getValue() != null ) {
return new TextDisplayNode(parentNode, obj.toString());
}
{code}
the obj.toString() will preserve the ' ' tic marks around the space
validation problems with trim and concat used together.
-------------------------------------------------------
Key: TEIIDDES-1623
URL:
https://issues.jboss.org/browse/TEIIDDES-1623
Project: Teiid Designer
Issue Type: Bug
Components: Validation
Affects Versions: 7.7
Reporter: Johnathon Lee
Assignee: Barry LaFond
Attachments: Trimtest.zip
Using the latest JBDS 5.0 and the attached simplified Model Project Set (Trimtest.zip).
On the view model CCH_V.memmasV change the transformation to [1] and perform a
Save/Validate. It will be rewritten to [2] and give a parsing error.
[1]
SELECT
ltrim(Memb.LSTNAM) || ', ' || trim('foo') ||' '||
trim(Memb.MIDNAM) AS MEMBER_NAME
FROM
CCH.MEMMAS AS Memb
[2]
SELECT
((((ltrim(Memb.LSTNAM) || ', ') || trim( FROM )) || ' ') || trim( FROM
Memb.MIDNAM)) AS MEMBER_NAME
FROM
CCH.MEMMAS AS Memb
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira