Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-6044

Analytic planner misses some opportunities to merge partition groups

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Impala 2.7.0
    • None
    • Frontend
    • None

    Description

      Version: Impala Shell v2.7.0-cdh5.9.1 (24ad6df) built on Wed Jan 11 13:39:25 PST 2017

      I used analytic function sum with over clause as below,

      sum(power(sedol_weight_in_collective_all, 2) / manager_cnt_per_sedol * power(residual_risk, 2) * 12) over (partition by activity_date_id) as total_stock_specific_risk
      

      Even there was no explicit order by clause in over clause, query profile(see attached screenshot) shows impala sorted records according to partition keys by default. I think for sum function, records within subgroups should not be sorted. There is not any help for sorting instead, it downgrades performance.

      Attachments

        1. Untitled2.png
          24 kB
          Zhangyi Lu
        2. Untitled.png
          18 kB
          Zhangyi Lu
        3. screenshot-3.png
          40 kB
          Zhangyi Lu

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zhangyi.lu Zhangyi Lu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: