You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@quickstep.apache.org by "Harshad Deshmukh (JIRA)" <ji...@apache.org> on 2016/08/30 19:34:21 UTC

[jira] [Created] (QUICKSTEP-50) Finding and eliminating common sub-expression in aggregation

Harshad Deshmukh created QUICKSTEP-50:
-----------------------------------------

             Summary: Finding and eliminating common sub-expression in aggregation
                 Key: QUICKSTEP-50
                 URL: https://issues.apache.org/jira/browse/QUICKSTEP-50
             Project: Apache Quickstep
          Issue Type: New Feature
          Components: Expressions, Relational Operators
            Reporter: Harshad Deshmukh


Background: Sometimes in aggregation, some expressions share a common sub-expression which can potentially be computed only once. For instance in TPC-H Q1 sum(lo_quantity) and avg(lo_quantity) can be computed only once and finally share the computation. 

Proposed solution: Optimizer should find such common sub-expressions and pass the information to the relational operator. The aggregation operator will compute only one common sub expression. In the Finalize aggregation operator, we can share the common sub expression among the consumer aggregation handles and let them compute the final result. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)