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

Correlated subqueries throws TEIID30328

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.4.1, 8.5
    • 8.4
    • Query Engine
    • None

    Description

      Non-pushed correlated subqueries that use a correlation variable that is a grouping column where the subquery is turned into a semi join (either through the MJ hint or costing) will fail to find the correlation values.

      For example the following against Netezza (which does not support correlated subqueries):

      SELECT A.INTKEY, A.STRINGNUM FROM BQT1.SMALLA AS A WHERE CONVERT(LONGNUM,
      STRING) = 8 GROUP BY A.INTKEY, A.STRINGNUM HAVING A.STRINGNUM = (SELECT
      MAX(B.STRINGNUM) FROM BQT1.SMALLA AS B WHERE A.INTKEY = B.INTKEY

      throws "TEIID30328 Unable to evaluate A.IntKey: No value was available"

      If the subplan is not converted to a join or the correlated column is not a grouping expression, then there is no issue.

      Attachments

        Activity

          People

            rhn-engineering-shawkins Steven Hawkins
            wgibson_jira Warren Gibson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: