]
Steven Hawkins resolved TEIID-4791.
-----------------------------------
Fix Version/s: 9.3
9.2.1
9.1.4
Resolution: Done
Accounted for reserved words in the generated underlying query.
Bypass lookup function's keycolumn reserved word
------------------------------------------------
Key: TEIID-4791
URL:
https://issues.jboss.org/browse/TEIID-4791
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.12.x
Environment: JDV 6.3.2
Windows 7, 64-bit
Reporter: Steve Tran
Assignee: Steven Hawkins
Fix For: 9.3, 9.2.1, 9.1.4
When using the Teiid LOOKUP function, the 3rd argument is to specify the keycolumn. In
my table, the column I want to reference is literally named "value", which is a
SQL reserved word. The generated query chokes on this because it's not expecting a
reserved word to be here when parsing the grammar. I've tried quoting and escaping to
get around this, but nothing seems to work.
{code}
21:18:55,860 WARN [org.teiid.PROCESSOR] (Worker16_QueryProcessorQueue167) TEIID30020
Processing exception for request NLkytVFPLOM6.0 'TEIID30328 Unable to evaluate
lookup('tdsa_vbl.t_code_translate', 'descr', 'value',
'NAMS'): TEIID31100 Parsing error: Encountered "SELECT [*]VALUE[*]
,DESCR" at line 1, column 8.
Was expecting: "char" | "date" | "time" |
"timestamp" | "cast" | "convert" | "all" |
"any" | "array_agg" | "case" ...'. Originally
ExpressionEvaluationException QueryParser.java:214. Enable more detailed logging to see
the entire stacktrace.
21:19:13,077 WARN [org.teiid.PROCESSOR] (Worker16_QueryProcessorQueue168) TEIID30020
Processing exception for request /qqhN3vx+au1.0 'TEIID31118 Element
"tdsa_vbl.t_code_translate."[value]"" is not defined by any relevant
group.'. Originally QueryResolverException ResolverVisitor.java:106. Enable more
detailed logging to see the entire stacktrace.
21:19:40,897 WARN [org.teiid.PROCESSOR] (Worker16_QueryProcessorQueue169) TEIID30020
Processing exception for request 1TAniWpe2wpN.0 'TEIID31119 Symbol
"'value'" is specified with an unknown group context'. Originally
QueryResolverException ResolverVisitor.java:106. Enable more detailed logging to see the
entire stacktrace.
21:19:52,600 WARN [org.teiid.PROCESSOR] (Worker16_QueryProcessorQueue170) TEIID30020
Processing exception for request +8tCacHlFS8D.0 'TEIID31119 Symbol "value"
is specified with an unknown group context'. Originally QueryResolverException
ResolverVisitor.java:106. Enable more detailed logging to see the entire stacktrace.
{code}