Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-5258

Optimize aggregations without Group By followed by a Cross Join

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      For example, we should use a single MR job to execute the following query

      SELECT *
      FROM (SELECT tmp1.cnt1, tmp2.cnt2
            FROM (SELECT count(*) as cnt1
                  FROM src1 x) tmp1
            JOIN (SELECT count(*) as cnt2
                  FROM src1 y) tmp2) tmp3;
      

      The reduce phase should have the reduce side GroupByOperators of tmp1 and tmp2, and the JoinOperator for the cross join.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: