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

Group by promotion not happening with aggregate dim attributes

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.7
    • cube
    • 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
          SushilMohanty

        Activity

          People

            sushilmohanty SushilMohanty
            sushilmohanty SushilMohanty
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: