Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Query Processor
    • None

    Description

      Right now, the query shown below cannot be optimized by correlation optimizer because for distinct aggregations, distinct columns will be added into the sorting keys.

      SELECT a.key AS key1, a.cnt AS cnt1, b.key AS key2, b.cnt AS cnt2
      FROM (SELECT x.key as key, count(DISTINCT x.value) AS cnt FROM src x group by x.key) a
      JOIN (SELECT y.key as key, count(DISTINCT y.value) AS cnt FROM src1 y group by y.key) b
      ON (a.key = b.key)
      

      Attachments

        Activity

          People

            yhuai Yin Huai
            yhuai Yin Huai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: