You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "Jaehwa Jung (JIRA)" <ji...@apache.org> on 2014/10/30 04:47:34 UTC

[jira] [Assigned] (TAJO-1005) Sort on expression values including aggregation function should be supported.

     [ https://issues.apache.org/jira/browse/TAJO-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jaehwa Jung reassigned TAJO-1005:
---------------------------------

    Assignee: Jaehwa Jung  (was: Hyunsik Choi)

> Sort on expression values including aggregation function should be supported.
> -----------------------------------------------------------------------------
>
>                 Key: TAJO-1005
>                 URL: https://issues.apache.org/jira/browse/TAJO-1005
>             Project: Tajo
>          Issue Type: Improvement
>          Components: planner/optimizer
>            Reporter: Hyunsik Choi
>            Assignee: Jaehwa Jung
>
> h3. Background
> In Tajo, expression evaluation are performed at only three operators, Scan, Join, and Projection. An expression is divided into multiple sub expressions, and then they are placed into proper operators.
> h3. Problem
> See the following example:
> {code}
> SELECT sum(x) / 100 as b from lineitem order by b
> {code}
> Tajo evaluates expressions at three operators: scan, join, and projection. Aggregation functions are evaluated at groupby operator, and expressions including aggregation functions are evaluated at projection operator.
> But, sort operator is placed between aggregation function and projection. So, sort operator does not have any opportunity to take the result of some expression including aggregation functions.
> h3. Solution
> So far, projection operator is only topmost operator of all operators. To solve the above problem, we need to improve the order of operators. Especially, projection operator can be interleaved between all operators.
> More specially, we allow projection operator to be inserted between group-by and sort operators. If so, the above problem will be solved.



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