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

Unrelated correlated subquery in order by not working

    XMLWordPrintable

Details

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

      Use a inline view:

      select ... from (select ..., (select count(*) from x where x.fid = foo.id) as c from foo) v order by v.c
      
      Show
      Use a inline view: select ... from (select ..., (select count(*) from x where x.fid = foo.id) as c from foo) v order by v.c

    Description

      A query such as the one below will fail with a low level exception:

      select * from foo order by (select count(*) from x where x.fid = foo.id)
      

      We should either validate against or update the logic (probably adding an inline view in the rewriter).

      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: