You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Zhangyi Lu (JIRA)" <ji...@apache.org> on 2017/10/12 15:34:07 UTC

[jira] [Created] (IMPALA-6044) Meaningless sort in over clause

Zhangyi Lu created IMPALA-6044:
----------------------------------

             Summary: Meaningless sort in over clause
                 Key: IMPALA-6044
                 URL: https://issues.apache.org/jira/browse/IMPALA-6044
             Project: IMPALA
          Issue Type: Bug
          Components: Backend, Distributed Exec
    Affects Versions: Impala 2.7.0
            Reporter: Zhangyi Lu
            Priority: Critical
         Attachments: Untitled.png, Untitled2.png

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,
{code}
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
{code}
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. 





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)