You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "logicigam (JIRA)" <ji...@apache.org> on 2016/08/08 09:29:20 UTC
[jira] [Commented] (KYLIN-1377) TopN measure should support more
expressions
[ https://issues.apache.org/jira/browse/KYLIN-1377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15411586#comment-15411586 ]
logicigam commented on KYLIN-1377:
----------------------------------
not only max,min,we need to select topN on a count measure and count(distinct) measure also.
> 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: Shaofeng SHI
> Assignee: Shaofeng SHI
> 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
(v6.3.4#6332)