Uploaded image for project: 'Pentaho Analysis - Mondrian'
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-2394

Mondrian TopCount returns only non empty tuples when native.topcount is enabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: Urgent
    • Resolution: Fixed
    • Affects Version/s: Master, 5.3.0.4, 5.4.0.1 GA
    • Fix Version/s: 6.0.1 GA, 6.1.0 GA
    • Component/s: None
    • Labels:
      None
    • Story Points:
      0
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • Sprint Team:
      Maintenance

      Description

      In cases where TopCount excludes the third argument the tuple set specified in the first argument should return in natural ordering. E.g.

      select  topcount([Customers].[State Province].members, 3) on 0 from sales
      

      should return

      [Customers].[Canada].[BC]
      [Customers].[Mexico].[DF]
      [Customers].[Mexico].[Guerrero]

      Since these are the first 3 [State Province] members in natural ordering of the hierarchy, even though they have no fact data in the [Sales] cube.

      With mondrian.native.topcount.enable=true (the default setting) Mondrian will apply a SqlContextConstraint in this case, which ends up returning the 3 states in the [US] with data. Disabling the property causes Mondrian to return correct results.

      Reference: https://msdn.microsoft.com/en-us/library/ms144792.aspx

      The challenge with fixing this will be to still use native topcount, since that's very important with large dimensions where we need to avoid pulling in the full level, but not apply the context constraint.

        PractiTest Integration




          Attachments

            Issue Links

              Activity

                People

                Assignee:
                AKarneichyk Alena Karneichyk (Inactive)
                Reporter:
                mcampbell Matt Campbell
                Votes:
                1 Vote for this issue
                Watchers:
                12 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: