-
Bug
-
Resolution: Done
-
Critical
-
7.1.1
-
None
I ran into this executing the E2E TPCR Text Metadata Test Script and it can be reproduced by focusing on query #22. A model project set and other necessary artifacts will be attached. The whole error, from SQuirreL, is:
Error: Error Code:107 Message:Remote org.teiid.core.TeiidProcessingException: Error Code:107 Message:Error Code:107 Message:'The column prefix 'custsale' does not match with a table name or alias name used in the query.' error executing statement(s): [Prepared Values: ['13', '17', '18', '23', '29', '30', '31', 0E-15, '13', '17', '18', '23', '29', '30', '31'] SQL: SELECT TOP 100 v_0.c_0, COUNT AS c_1, SUM(v_0.c_1) AS c_2 FROM (SELECT left(g_0.C_PHONE, 2) AS c_0, g_0.C_ACCTBAL AS c_1 FROM CUSTOMER g_0 WHERE left(g_0.C_PHONE, 2) IN (?, ?, ?, ?, ?, ?, ?) AND g_0.C_ACCTBAL > (SELECT AVG(g_1.C_ACCTBAL) FROM CUSTOMER g_1 WHERE g_1.C_ACCTBAL > ? AND left(g_1.C_PHONE, 2) IN (?, ?, ?, ?, ?, ?, ?)) AND NOT (EXISTS (SELECT g_2.O_ORDERKEY, g_2.O_CUSTKEY, g_2.O_ORDERSTATUS, g_2.O_TOTALPRICE, g_2.O_ORDERDATE, g_2.O_ORDERPRIORITY, g_2.O_CLERK, g_2.O_SHIPPRIORITY, g_2.O_COMMENT FROM ORDERS g_2 WHERE g_2.O_CUSTKEY = g_0.C_CUSTKEY))) v_0 GROUP BY v_0.c_0 ORDER BY custsale.c_0]
The executed query is: select * from vTpcr.Q22 ORDER BY cntrycode