Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-6060

WITH clause in combination with EXISTS throws null pointer


    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 15.0.2, 16.0.1, 17.0
    • 15.0
    • Query Engine
    • None
    • Undefined

      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.

            rhn-engineering-shawkins Steven Hawkins
            marc.kusters@rubix.nl Marc Kusters (Inactive)
            0 Vote for this issue
            2 Start watching this issue