The following query (simplified) throws a null pointer exception in the Teiid Springboot Starter 1.6.0:
WITH securityTable AS (SELECT securityRole FROM securityRoles)
SELECT * FROM multipleTablesAndSomeJoins AS mtsj
WHERE EXISTS (SELECT securityRole FROM securityTable WHERE securityRole = mtsj.securitySector);
The securityRoles table is a TextTable that parses a UDF which gives the securitycontext of a user.
Removing the WITH clause solves the problem. Replacing the EXISTS clause with e.g. IN also solves the problem. However, we don't get the performance we want.
Original question on stackoverflow:
This is the first Jira ticket I place here if I missed something please let me know.