You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by "hcy (Jira)" <ji...@apache.org> on 2020/12/01 09:09:00 UTC

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

hcy created KYLIN-4832:
--------------------------

             Summary: 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
            Reporter: hcy


When the parameter of max or min function is an expression containing a dimension column rather than a direct dimension column

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}{color:#172b4d}if only max(part_dt),query is ok.{color}
{color}

{color:#b94a48}{color:#172b4d}the above test sql results expected as :
{color}{color}
|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)