You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Xiaoxiang Yu (Jira)" <ji...@apache.org> on 2021/04/02 03:43:00 UTC

[jira] [Updated] (KYLIN-4832) No realization found error when max/min param is expression

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

Xiaoxiang Yu updated KYLIN-4832:
--------------------------------
    Fix Version/s:     (was: v3.1.2)
                   v3.2.0

> No realization found error when max/min param is expression
> -----------------------------------------------------------
>
>                 Key: KYLIN-4832
>                 URL: https://issues.apache.org/jira/browse/KYLIN-4832
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: v3.1.0
>            Reporter: hcy
>            Priority: Major
>             Fix For: v3.2.0
>
>
> When the parameter of max or min function is an expression containing a dimension column rather than a direct dimension column query error
> test cube KYLIN_SALES_CUBE
> test sql:
> select LSTG_FORMAT_NAME,
>  max(CASE WHEN (ops_region = 'Shanghai') THEN 'SH' WHEN (ops_region = 'Beijing') THEN 'BJ' ELSE 'other' END) as region_max,
>  min(CASE WHEN (ops_region = 'Shanghai') THEN 'SH' WHEN (ops_region = 'Beijing') THEN 'BJ' ELSE 'other' END) as region_min,
>  max(part_dt) as part_dt_max,
>  max(\{fn month(part_dt)}) as month_max
>  from kylin_sales 
>  group by LSTG_FORMAT_NAME
>  order by LSTG_FORMAT_NAME
> error log:
> {color:#b94a48}No realization found for OLAPContext, CUBE_UNMATCHED_AGGREGATION{color}
> {color:#b94a48}if only max(part_dt),query is ok.{color}
>  
>  
>  the above test sql results expected as :
> |LSTG_FORMAT_NAME|REGION_MAX|REGION_MIN|PART_DT_MAX|MONTH_MAX|
> |ABIN|other|BJ   |2012/12/30|12|
> |Auction|other|BJ   |2012/12/30|12|
> |FP-GTC|other|BJ   |2012/12/30|12|
> |FP-non GTC|other|BJ   |2012/12/30|12|
> |Others|other|BJ   |2012/12/30|12|
>  
>  
>  



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