Uploaded image for project: 'Apache Lens'
  1. Apache Lens
  2. LENS-1264

Group by promotion not happening with aggregate dim attributes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7
    • Component/s: cube
    • Labels:
      None

      Description

      <expression name="distinct_users" _type="BIGINT" display_string="Distinct Users">
      <expr_spec expr="count(distinct(user))"/>
      </expression>
      
      cube query : 
      query execute cube select country,distinct_users from testcube where time_range_in(time_col,'2016-07-31-00','2016-07-31-01')
      
      rewritten query :
      SELECT distinct (testcube.country), count(distinct (testcube.user)) FROM db.fact_table testcube WHERE (((testcube.dt) in ('2016-07-31-00')))
      

      Query fails with the following:
      Error Message: Line 1:226 Not yet supported place for UDAF 'count'

      Column testcube.country should be part of group by as there is already aggregate column used in select.

        Attachments

        1. LENS-1264.patch
          6 kB
          Sushil Mohanty

          Activity

            People

            • Assignee:
              sushilmohanty Sushil Mohanty
              Reporter:
              sushilmohanty Sushil Mohanty
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: