[jira] [Commented] (KYLIN-3988) Weighted Average does not work on cube

2019-04-27 Thread Shaofeng SHI (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16827626#comment-16827626
 ] 

Shaofeng SHI commented on KYLIN-3988:
-

Hello Anoop, sum(x*y) couldn't be translated to sum(x) and sum(y) with any 
operator, so it is not supported by Kylin, unless you define a column "z" = 
"x*y" in the source table, and then define "sum(z)" as a measure. If you're not 
willing to add this column in your hive table, you can define it in a hive 
view, and then use the view as the cube fact table.

> Weighted Average does not work on cube
> --
>
> Key: KYLIN-3988
> URL: https://issues.apache.org/jira/browse/KYLIN-3988
> Project: Kylin
>  Issue Type: Bug
>  Components: Driver - ODBC
>Affects Versions: v2.6.1
>Reporter: Anoop Krishnaswamy
>Priority: Critical
>
> When we try to get aggregate over multiplication of 2 metrics it throws an 
> error:
> That both of the two sides of the BinaryTupleExpression own columns is not 
> supported for * while executing SQL: "select 
> sum(riskscoreinitial*cyc_xxx_balanceAdb), cyc_xxx_cyclesdelinquent from 
> fct_profit_table_monthly group by cyc_xxx_cyclesdelinquent LIMIT 5"
>  
> My query looks something like this :
>  
> select sum(*),  from  group by 
> Any guidance will help



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


[jira] [Commented] (KYLIN-3988) Weighted Average does not work on cube

2019-04-26 Thread xingzhicn (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16827482#comment-16827482
 ] 

xingzhicn commented on KYLIN-3988:
--

I used the same way to reproduce this problem, I think it is because cuboids 
does not store your Measure metadata, which will make the cube data very large, 
cuboids will combine your dimensions and measures together to store hbase In 
the case, sum(Measure *Measure) is not supported. You can use 
{code:java}
// select sum(Measure )*sum(Measure ) from library_collection where org_code = 
'001'{code}
but obviously this is not what you want :), the current version Depending on 
the lack of a good solution, look forward to the answers of others

> Weighted Average does not work on cube
> --
>
> Key: KYLIN-3988
> URL: https://issues.apache.org/jira/browse/KYLIN-3988
> Project: Kylin
>  Issue Type: Bug
>  Components: Driver - ODBC
>Affects Versions: v2.6.1
>Reporter: Anoop Krishnaswamy
>Priority: Critical
>
> When we try to get aggregate over multiplication of 2 metrics it throws an 
> error:
> That both of the two sides of the BinaryTupleExpression own columns is not 
> supported for * while executing SQL: "select 
> sum(riskscoreinitial*cyc_xxx_balanceAdb), cyc_xxx_cyclesdelinquent from 
> fct_profit_table_monthly group by cyc_xxx_cyclesdelinquent LIMIT 5"
>  
> My query looks something like this :
>  
> select sum(*),  from  group by 
> Any guidance will help



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