Bug 1227547

Summary: xml encoding/decoding destroys a sql query for Transformation in a view model
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Hisao Furuichi <hfuruich>
Component: ToolingAssignee: jolee
Status: CLOSED WONTFIX QA Contact: Andrej Smigala <asmigala>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: blafond, jolee, mbaluch, vhalbert
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-24 17:54:28 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 Hisao Furuichi 2015-06-03 01:39:25 UTC
Description of problem:
 In a sql query for transformation in a view model, If user writes "ESCAPE '\u0000'" and save it, it will saved as "ESCAPE '&#x0;'" and can not open the view model anymore with parse exception.

 The reason why user wants to set "ESCAPE '\u0000' is a workaround for this jira ticket, TEIIDDES-2217.

Version-Release number of selected component (if applicable):
- JBDS 8.1.0
- Teiid Designer 9.0.1.Final-v20150211-1407-B643


Steps to Reproduce:
1. Create a new Teiid Project
2. Create a source/view model which uses csv file
3. Open a transformation editor, and fix the query like this:

 before:
===
SELECT
 A.a, A.b, A.c
FROM
 (EXEC SourceModel.getTextFiles('sample.csv')) AS f, TEXTTABLE(f.file COLUMNS a string, b string, c string HEADER) AS A
===

 after:
===
SELECT
 A.a, A.b, A.c
FROM
 (EXEC SourceModel.getTextFiles('sample.csv')) AS f, TEXTTABLE(f.file COLUMNS a string, b string, c string ESCAPE '\u0000' HEADER) AS A
===

4. save the projects and shutdown JBDS
5. Reboot JBDS and open the view model

Actual results:
Can not open the view model

Expected results:
User can open the view model, and the fixed sql is still there.

Additional information: 
Whenever this issue occurs, user needs to modify the xmi file by hand and it reduce the performance a lot. So please let me know the workaround if exists.

Thx

Comment 1 JBoss JIRA Server 2015-06-17 15:48:25 UTC
Paul Richardson <p.g.richardson.uk> updated the status of jira TEIIDDES-2548 to Resolved

Comment 5 JBoss JIRA Server 2015-08-03 08:17:25 UTC
Andrej Šmigala <asmigala> updated the status of jira TEIIDDES-2548 to Closed