Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
v3.1.0
-
None
Description
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:
No realization found for OLAPContext, CUBE_UNMATCHED_AGGREGATION
if only max(part_dt),query is ok.
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 |
Attachments
Issue Links
- duplicates
-
KYLIN-4831 sql error when max/min/sum param is constant
- Closed