Pentaho Analysis - Mondrian
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-406

Rollup policy doesn't work for implicitly visible members

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Severe Severe
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • 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 made some the following change to Foodmart.xml to test rollupPolicy

      <Role name="California manager"> <SchemaGrant access="none"> <CubeGrant cube="Sales" access="all"> <HierarchyGrant hierarchy="[Store]" rollupPolicy="full" access="custom"> <MemberGrant member="[Store].[USA].[CA]" access="all"/> </HierarchyGrant>.... etc
      Basically, just changed so that California manager has a rollupPolicy on [Store] (eliminated level too since that was causing JPivot problems).
      When I set the policy to "full" I get the behavior described in the documentation as "partial"
      select {[Measures].[Unit Sales]} ON COLUMNS,
      Hierarchize(Union(Union(Union({[Store].[All Stores]}, [Store].[All Stores].Children), [Store].[All Stores].[USA].Children), [Store].[All Stores].[USA].[CA].Children)) ON ROWS
      from [Sales]
      where [Time].[1997]

      yields

      All Stores 74,748
      USA 74,748
      CA 74,748
      Alameda
        
      Beverly Hills 21,333
      Los Angeles 25,663
      San Diego 25,635
      San Francisco 2,117

      The All Stores total is the total for only the members this role is allowed to see. This is also the default behavior:
      <HierarchyGrant hierarchy="[Store]" access="custom"> is the same as "full".

      Setting it to "partial" yields no different results. Still, All Stores/USA are showing only the totals for the members which this user can see.
      <HierarchyGrant hierarchy="[Store]" rollupPolicy="partial" access="custom">

      Hidden doesn't do the trick either
      <HierarchyGrant hierarchy="[Store]" rollupPolicy="hidden" access="custom">

      mondrian-3.0.2.10775-derby .war file

        Activity

        Hide
        Mondrian Importer User added a comment -
        {nickgoodman}, 04/26/2008: IP, Artifact Created: 67.183.65.17 |
        {jhyde}, 04/26/2008: IP, Comment Added: 69.239.237.247 |
        {nickgoodman}, 04/28/2008: IP, Comment Added: 67.183.65.17 |
        {nickgoodman}, 04/28/2008: File Added, 276153: rollup_test1.jsp |
        {nickgoodman}, 04/28/2008: IP, Comment Added: 67.183.65.17 |
        {jhyde}, 05/01/2008: IP, Comment Added: 64.81.57.79 |
        {jhyde}, 05/01/2008: assigned_to, 100 |
        {jhyde}, 05/01/2008: status_id, 1 |
        {jhyde}, 05/01/2008: resolution_id, 100 |
        {jhyde}, 05/01/2008: close_date, 0 |
        {jhyde}, 05/01/2008: summary, rollupPolicy doesn't work in FoodMart.xml
        Show
        Mondrian Importer User added a comment - {nickgoodman}, 04/26/2008: IP, Artifact Created: 67.183.65.17 | {jhyde}, 04/26/2008: IP, Comment Added: 69.239.237.247 | {nickgoodman}, 04/28/2008: IP, Comment Added: 67.183.65.17 | {nickgoodman}, 04/28/2008: File Added, 276153: rollup_test1.jsp | {nickgoodman}, 04/28/2008: IP, Comment Added: 67.183.65.17 | {jhyde}, 05/01/2008: IP, Comment Added: 64.81.57.79 | {jhyde}, 05/01/2008: assigned_to, 100 | {jhyde}, 05/01/2008: status_id, 1 | {jhyde}, 05/01/2008: resolution_id, 100 | {jhyde}, 05/01/2008: close_date, 0 | {jhyde}, 05/01/2008: summary, rollupPolicy doesn't work in FoodMart.xml
        Hide
        Mondrian Importer User added a comment -
        {jhyde}, 04/26/2008: Logged In: YES
        user_id=312935
        Originator: NO

        I just tried adding this query as a unit test (not modifying foodmart.xml itself, admittedly) and I got the requested 'partial' rollup behavior. Before I spend more time trying to reproduce this, can you do a quick sanity check, Nick, to make sure you're really working against 3.0.2 with the 'California manager' role.
        Show
        Mondrian Importer User added a comment - {jhyde}, 04/26/2008: Logged In: YES user_id=312935 Originator: NO I just tried adding this query as a unit test (not modifying foodmart.xml itself, admittedly) and I got the requested 'partial' rollup behavior. Before I spend more time trying to reproduce this, can you do a quick sanity check, Nick, to make sure you're really working against 3.0.2 with the 'California manager' role.
        Hide
        Mondrian Importer User added a comment -
        {nickgoodman}, 04/28/2008: Logged In: YES
        user_id=363645
        Originator: YES

        Julian,

        Happy to. However, your comment seems to actually confirm this right? Without modifying foodmart.xml (which has no rolllupPolicy=) you should get the "full" behavior since this is the default (according to docs). Foodmart with NO changes, should be "full" instead of the "partial" you observed, right?

        I unzipped a fresh 3.0.2 embedded into tomcat this morning (no other Pentaho/deployed)

        nick-goodmans-computer:~/dev/tomcat/apache-tomcat-5.5.26/webapps ngoodman$ ls
        ROOT birt dwr.war servlets-examples webdav
        balancer dwr jsp-examples tomcat-docs
        nick-goodmans-computer:~/dev/tomcat/apache-tomcat-5.5.26/webapps ngoodman$ mkdir mondrian-embedded
        nick-goodmans-computer:~/dev/tomcat/apache-tomcat-5.5.26/webapps ngoodman$ cd mondrian-embedded/
        nick-goodmans-computer:~/dev/tomcat/apache-tomcat-5.5.26/webapps/mondrian-embedded ngoodman$ unzip /Users/ngoodman/pentaho/mondrian-3.0.2.10775-derby/mondrian-3.0.2.10775-embedded/
        nick-goodmans-computer:~/dev/tomcat/apache-tomcat-5.5.26/webapps/mondrian-embedded ngoodman$ unzip /Users/ngoodman/pentaho/mondrian-3.0.2.10775-derby/mondrian-3.0.2.10775-embedded/lib/mondrian-embedded.war

        I made no changes to Foodmart.xml

        I added "rollup_test1.jsp" to WEB-INF/queries (and attached)
        ---- BEGIN rollup_test1.jsp ----
        <%@ page session="true" contentType="text/html; charset=ISO-8859-1" %>
        <%@ taglib uri="http://www.tonbeller.com/jpivot" prefix="jp" %>
        <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

        <jp:mondrianQuery id="query01" jdbcDriver="org.apache.derby.jdbc.EmbeddedDriver" jdbcUrl="jdbc:derby:classpath:/foodmart" catalogUri="/WEB-INF/queries/FoodMart.xml"
           jdbcUser="sa" jdbcPassword="sa" connectionPooling="false" role="California manager">
        select {[Measures].[Unit Sales]} ON COLUMNS,
          Hierarchize(Union(Union({[Store].[All Stores].[USA]}, [Store].[All Stores].[USA].Children), [Store].[All Stores].[USA].[CA].Children)) ON ROWS
        from [Sales]
        where [Time].[1997]
        </jp:mondrianQuery>

        <c:set var="title01" scope="session">Test Query uses Mondrian OLAP</c:set>
        ---- END rollup_test1.jsp ----
        NOTE: I had to change the MDX since I had made other slight mods to the California role in the previous submission. This test I didn't touch foodmart.xml

        http://localhost:8080/mondrian-embedded/testpage.jsp?query=mondrian
        Yields view with 266,673 (which is the value we would expect to see below)

        http://localhost:8080/mondrian-embedded/testpage.jsp?query=rollup_test1
        Yields the "partial" rollup behavior. According to the documentation, "full" is the default so since I haven't made any changes to Foodmart.xml at this point, I'd expect to see 266,673 as the [USA] total instead of 74,748.
        Show
        Mondrian Importer User added a comment - {nickgoodman}, 04/28/2008: Logged In: YES user_id=363645 Originator: YES Julian, Happy to. However, your comment seems to actually confirm this right? Without modifying foodmart.xml (which has no rolllupPolicy=) you should get the "full" behavior since this is the default (according to docs). Foodmart with NO changes, should be "full" instead of the "partial" you observed, right? I unzipped a fresh 3.0.2 embedded into tomcat this morning (no other Pentaho/deployed) nick-goodmans-computer:~/dev/tomcat/apache-tomcat-5.5.26/webapps ngoodman$ ls ROOT birt dwr.war servlets-examples webdav balancer dwr jsp-examples tomcat-docs nick-goodmans-computer:~/dev/tomcat/apache-tomcat-5.5.26/webapps ngoodman$ mkdir mondrian-embedded nick-goodmans-computer:~/dev/tomcat/apache-tomcat-5.5.26/webapps ngoodman$ cd mondrian-embedded/ nick-goodmans-computer:~/dev/tomcat/apache-tomcat-5.5.26/webapps/mondrian-embedded ngoodman$ unzip /Users/ngoodman/pentaho/mondrian-3.0.2.10775-derby/mondrian-3.0.2.10775-embedded/ nick-goodmans-computer:~/dev/tomcat/apache-tomcat-5.5.26/webapps/mondrian-embedded ngoodman$ unzip /Users/ngoodman/pentaho/mondrian-3.0.2.10775-derby/mondrian-3.0.2.10775-embedded/lib/mondrian-embedded.war I made no changes to Foodmart.xml I added "rollup_test1.jsp" to WEB-INF/queries (and attached) ---- BEGIN rollup_test1.jsp ---- <%@ page session="true" contentType="text/html; charset=ISO-8859-1" %> <%@ taglib uri=" http://www.tonbeller.com/jpivot " prefix="jp" %> <%@ taglib prefix="c" uri=" http://java.sun.com/jstl/core " %> <jp:mondrianQuery id="query01" jdbcDriver="org.apache.derby.jdbc.EmbeddedDriver" jdbcUrl="jdbc:derby:classpath:/foodmart" catalogUri="/WEB-INF/queries/FoodMart.xml"    jdbcUser="sa" jdbcPassword="sa" connectionPooling="false" role="California manager"> select {[Measures].[Unit Sales]} ON COLUMNS,   Hierarchize(Union(Union({[Store].[All Stores].[USA]}, [Store].[All Stores].[USA].Children), [Store].[All Stores].[USA].[CA].Children)) ON ROWS from [Sales] where [Time].[1997] </jp:mondrianQuery> <c:set var="title01" scope="session">Test Query uses Mondrian OLAP</c:set> ---- END rollup_test1.jsp ---- NOTE: I had to change the MDX since I had made other slight mods to the California role in the previous submission. This test I didn't touch foodmart.xml http://localhost:8080/mondrian-embedded/testpage.jsp?query=mondrian Yields view with 266,673 (which is the value we would expect to see below) http://localhost:8080/mondrian-embedded/testpage.jsp?query=rollup_test1 Yields the "partial" rollup behavior. According to the documentation, "full" is the default so since I haven't made any changes to Foodmart.xml at this point, I'd expect to see 266,673 as the [USA] total instead of 74,748.
        Hide
        Mondrian Importer User added a comment -
        {nickgoodman}, 04/28/2008: Logged In: YES
        user_id=363645
        Originator: YES

        File Added: rollup_test1.jsp
        Show
        Mondrian Importer User added a comment - {nickgoodman}, 04/28/2008: Logged In: YES user_id=363645 Originator: YES File Added: rollup_test1.jsp
        Hide
        Mondrian Importer User added a comment -
        {jhyde}, 05/01/2008: Logged In: YES
        user_id=312935
        Originator: NO

        Changed subject line, formerly "rollupPolicy doesn't work in FoodMart.xml". The problem is with members that are implicitly visible because one or more of their descendants are visible, but are not explicitly visible. The algorithm already deals correctly with members which have invisible descendants because those descendants are explicitly denied.

        Fixed in change 10986.
        Show
        Mondrian Importer User added a comment - {jhyde}, 05/01/2008: Logged In: YES user_id=312935 Originator: NO Changed subject line, formerly "rollupPolicy doesn't work in FoodMart.xml". The problem is with members that are implicitly visible because one or more of their descendants are visible, but are not explicitly visible. The algorithm already deals correctly with members which have invisible descendants because those descendants are explicitly denied. Fixed in change 10986.

          People

          • Assignee:
            Julian Hyde
            Reporter:
            nickgoodman
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: