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

Shao Feng Shi closed KYLIN-1377.
--------------------------------
      Assignee:     (was: Shao Feng Shi)
    Resolution: Won't Fix

> TopN measure should support more expressions
> --------------------------------------------
>
>                 Key: KYLIN-1377
>                 URL: https://issues.apache.org/jira/browse/KYLIN-1377
>             Project: Kylin
>          Issue Type: New Feature
>    Affects Versions: v1.4.0
>            Reporter: Shao Feng Shi
>            Priority: Major
>             Fix For: Backlog
>
>
> TopN should support not only SUM, but also MAX, MIN as the expression.
> A possible case is, find out the sellers which sold the top expensive items:
> select seller_id, max(price) from sals_records where region = 'US' and year = 
> '2015' order by max(price) desc limit 100;
> In the future, more parameter should be supported
> 1) the expression (default SUM); 2) the soring order (default Desc). 3) the 
> encoding method:
> A sample is:
> {code}
> {
>     "name" : "TOP_SELLER",
>     "function" : {
>       "expression" : "TOP_N",
>       "parameter" : {
>         "id": 0,
>         "type" : "column",
>         "value" : "PRICE",
>         "next_parameter" : {
>           "id": 1,
>           "type" : "column",
>           "value" : "SELLER_ID",
>           "next_parameter" : {
>              "id": 2,
>             "type" : "",
>             "value" : "SUM",
>             "next_parameter" : {
>               "id": 3,
>               "type" : "",
>               "value" : "DESC"
>                 "next_parameter" : {
>                  "id": 4,
>                 "type" : "",
>                 "value" : "dict"
>             }
>             }
>         }
>       },
>       "returntype" : "topn(100)"
>     },
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to