Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-4832

No realization found error when max/min param is expression

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • v3.1.0
    • v3.1.4
    • Query Engine
    • 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

          Activity

            People

              Unassigned Unassigned
              dianhu hcy
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: