]
Steven Hawkins commented on TEIIDDES-2938:
------------------------------------------
He's saying the descriptions needs to be treated as a string literal - single quotes
need to be escaped with another single quote.
Escape single quotes in the ANNOTATION string
---------------------------------------------
Key: TEIIDDES-2938
URL:
https://issues.jboss.org/browse/TEIIDDES-2938
Project: Teiid Designer
Issue Type: Bug
Components: Dynamic VDBs
Reporter: Ramesh Reddy
When reading metadata from TEIID, when ANNOTATION property in the OPTIONS clause comes
with escaped string for single quotes it needs to be preserved. Otherwise you will see
errors like
{code}
09:06:36,945 WARN [org.teiid.RUNTIME] (teiid-async-threads - 1) TEIID50036 VDB
PREVIEW-1d551d3c-afa8-4eb9-8447-33175b1bdd14.1 model
"ClouderaImpalaJDBCConnection" metadata failed to load. Reason:TEIID30386
org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered
", ANNOTATION 'Any query with '[*]select[*]' in it will return this
table.')" at line 12, column 86.
Was expecting: "," | ")": org.teiid.metadata.ParseException:
TEIID30386 org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error:
Encountered ", ANNOTATION 'Any query with '[*]select[*]' in it will
return this table.')" at line 12, column 86.
Was expecting: "," | ")"
at org.teiid.query.parser.QueryParser.parseDDL(QueryParser.java:472)
[teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.metadata.MetadataFactory.parse(MetadataFactory.java:768)
[teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at
org.teiid.query.metadata.DDLMetadataRepository.loadMetadata(DDLMetadataRepository.java:40)
[teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at
org.teiid.runtime.AbstractVDBDeployer$MetadataRepositoryWrapper.loadMetadata(AbstractVDBDeployer.java:84)
[teiid-runtime-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at
org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55)
[teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.jboss.VDBService$6.run(VDBService.java:395)
[teiid-jboss-integration-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.jboss.VDBService$7.run(VDBService.java:446)
[teiid-jboss-integration-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_67]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_67]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error:
Encountered ", ANNOTATION 'Any query with '[*]select[*]' in it will
return this table.')" at line 12, column 86.
Was expecting: "," | ")"
at org.teiid.query.parser.QueryParser.convertParserException(QueryParser.java:214)
[teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
... 11 more
{code}