View removal with lateral join results in error
-----------------------------------------------
Key: TEIID-3472
URL:
https://issues.jboss.org/browse/TEIID-3472
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.0
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.11
Using a lateral join:
SELECT CAST(g1.col AS string), g0.a FROM (select 'a' as a, ('a',) as c)
AS g0, TABLE(select array_get(g0.c, 1) as col) AS g1
such that the left side is defined by a constant query, the view removal will not fully
replace the correlated references and result in an exception for getting the correlated
values (g0.c).