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

Correlated grouping expression not properly replaced in pushdown subquery

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.7
    • 8.4
    • Query Engine
    • None
    • Workaround Exists
    • Hide

      Use an inline view to correlated on a projected column. For example rather than:

      select x, (select avg(y) from tbl1 where x = tbl2.x) from tbl2 group by x

      use:

      select x, (select avg(y) from tbl1 where x = v.x) from (select x from tbl2 group by x) as v

      Show
      Use an inline view to correlated on a projected column. For example rather than: select x, (select avg(y) from tbl1 where x = tbl2.x) from tbl2 group by x use: select x, (select avg(y) from tbl1 where x = v.x) from (select x from tbl2 group by x) as v

    Description

      A correlated grouping expression appears in the pushdown query with the internal group name anon_grpX rather than the proper reference from the outer query.

      For example the user query:

      select x, (select avg(y) from tbl1 where x = tbl2.x) from tbl2 group by x

      would have

      where x = anon_grp0.x

      Attachments

        Activity

          People

            rhn-engineering-shawkins Steven Hawkins
            rhn-engineering-shawkins Steven Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: