Uploaded image for project: 'Pentaho BA Platform'
  1. Pentaho BA Platform
  2. BISERVER-1235

Multivalued dimension with parent-child hierarchy: children of the all level do not have counts associated with them in resultset

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: Medium
    • Resolution: Cannot Reproduce
    • Affects Version/s: Pentaho 1.6.2
    • Fix Version/s: 2.0.GA
    • Component/s: Analysis
    • Labels:
      None
    • Environment:
      Ubuntu 7.10, mysql 5.1, Mondrian 3.0.2
    • 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.

      Description

      I've debugged this issue on Mondrian 3.0.2.10775, though I originally encountered it in 2.4.2.

      I've attached an example schema with appropriate tables in csv format. Table names should be the same as the csv filenames. In mysql, eventfacts_bridged is actually a view, not a table, but I'm assuming this will make no difference (sorry, didn't check that case).

      A simple query to expose the problem is:

      select

      {[Measures].[Event Count]}

      on columns,

      {[Group].[All Groups].Children}

      on rows
      from [events]

      Note the sql that is generated; one of them is essentially this query:

      select `groupdimension_closure`.`groupkey_parent_closure_fk` as `c0`,
      count(`eventfacts_bridged`.`weight`) as `m0`
      from `groupdimension_closure` as `groupdimension_closure`,
      `eventfacts_bridged` as `eventfacts_bridged`
      where `eventfacts_bridged`.`groupkey_fk` = `groupdimension_closure`.`groupkey_closure_fk`
      group by `groupdimension_closure`.`groupkey_parent_closure_fk`;

      ... whose results clearly show the counts being generated. Tracing from RolapUtil.executeQuery(), I found a spot where sharedAggregations had each of these counts added as a hashmap entry, but when RolapStar.lookupAggregation() is later called, the local 'aggregation' variable is never populated with an aggregation. I'm unsure exactly how aggregationKey works, but from what I can tell the constrainedColumnBitsKey object is essentially responsible for matching up to the appropriate hashmap entry. Looking at sharedAggregations->Tables->(appropriate entry in this table)>key>constrainedColumnsBitKey->bits, the value contained there is 54975581388 = 0xCCCCCCCCC.

      I don't know java real well, but in C-land that typically means the variable is uninitialized, so it seems like a possible bug.

        Attachments

          Activity

            People

            Assignee:
            aphillips Aaron Phillips (Inactive)
            Reporter:
            phantal Brian Vandenberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: