kamal Maheshwari created IMPALA-6534:
----------------------------------------

             Summary: Impala query planner should be smart to remove extra 
GROUP BY
                 Key: IMPALA-6534
                 URL: https://issues.apache.org/jira/browse/IMPALA-6534
             Project: IMPALA
          Issue Type: Improvement
          Components: Backend
    Affects Versions: Impala 2.11.0
            Reporter: kamal Maheshwari
         Attachments: Query_cte_explain_plan.txt, Query_cte_profile.txt, 
Query_no_cte_explain_plan.txt, Query_no_cte_profile.txt, query_cte.hql, 
query_no_cte.hql

A customer shared a complex query (attached) from their existing DB environment 
which uses CTE. They noticed that the query didn't finish as-is. They took out 
the CTE block and the query finished quickly.

I then suggested to take out the GROUP BY from the CTE block and the query 
finished fairly quickly.

The ask is - if the planner can detect such situations and do the right thing. 
These are common scenarios for workload migrations.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to