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

no results when some level members in a member grant have no data

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Unknown Unknown
    • Resolution: Incomplete
    • Affects Version/s: 3.2.1 GA (3.7.0 GA Suite Release)
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Customer Case:
    • 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

      This schema is for a multi tenancy system.
      All hierarchies have a top level that identifies the customer.
      This top level is used in member grants to specify what data is accessible to a given role.
      All these hierarchy grants work individually, but fail in combinations when no data is available for one or more members of a hierarchy.
      e.g. Customer 1 has access to products 3, 4, 5. The restriction on products works when no other hierarchy restrictions are specified in the schema. When there are other hierarchy restrictions and there is no data for one product (e.g. 3), but there is data for others (4, 5), the query returns no data.
      1. aphrodite.xml
        26 kB
        Bart Maertens
      2. MONDRIAN-935.tar.gz
        173 kB
        Bart Maertens

        Activity

        Hide
        Jared Cornelius added a comment -
        Please attach your schema and some screenshots showing the issue.
        Show
        Jared Cornelius added a comment - Please attach your schema and some screenshots showing the issue.
        Hide
        Unassigned User added a comment -
        If you are a Pentaho Subscription customer, you may contact support and request that this case be reviewed/re-prioritized.
        Show
        Unassigned User added a comment - If you are a Pentaho Subscription customer, you may contact support and request that this case be reviewed/re-prioritized.
        Hide
        Man Shing Yau added a comment -
        Requested information has been attached to JIRA by client.
        Show
        Man Shing Yau added a comment - Requested information has been attached to JIRA by client.
        Hide
        Bart Maertens added a comment -
        This is ok when 1 restricted level is added to an Analyzer report. When more than one restricted level is added, Mondrian generates a SQL query that contains all restricted dimensions in the cube.
        Show
        Bart Maertens added a comment - This is ok when 1 restricted level is added to an Analyzer report. When more than one restricted level is added, Mondrian generates a SQL query that contains all restricted dimensions in the cube.
        Hide
        Julian Hyde added a comment -
        Trying to reproduce this. I wrote the following testcase on the FoodMart data set which seems to have all of the characteristics that allegedly cause this bug. But it works:

        {code:title=AccessControlTest.java|borderStyle=solid}
            public void testBugMondrian935() {
                final TestContext testContext =
                    TestContext.create(
                        null, null, null, null, null,
                        "<Role name='Role1'>\n"
                        + " <SchemaGrant access='none'>\n"
                        + " <CubeGrant cube='Sales' access='all'>\n"
                        + " <HierarchyGrant hierarchy='[Store Type]' access='custom' rollupPolicy='partial'>\n"
                        + " <MemberGrant member='[Store Type].[All Store Types]' access='none'/>\n"
                        + " <MemberGrant member='[Store Type].[Supermarket]' access='all'/>\n"
                        + " </HierarchyGrant>\n"
                        + " <HierarchyGrant hierarchy='[Customers]' access='custom' rollupPolicy='partial' >\n"
                        + " <MemberGrant member='[Customers].[All Customers]' access='none'/>\n"
                        + " <MemberGrant member='[Customers].[USA].[WA]' access='all'/>\n"
                        + " <MemberGrant member='[Customers].[USA].[CA]' access='none'/>\n"
                        + " <MemberGrant member='[Customers].[USA].[CA].[Los Angeles]' access='all'/>\n"
                        + " </HierarchyGrant>\n"
                        + " </CubeGrant>\n"
                        + " </SchemaGrant>\n"
                        + "</Role>\n");

                testContext.withRole("Role1").assertQueryReturns(
                    "select [Measures] on 0,\n"
                    + "[Customers].[USA].Children * [Store Type].Children on 1\n"
                    + "from [Sales]",
                    "Axis #0:\n"
                    + "{}\n"
                    + "Axis #1:\n"
                    + "{[Measures].[Unit Sales]}\n"
                    + "Axis #2:\n"
                    + "{[Customers].[USA].[CA], [Store Type].[Supermarket]}\n"
                    + "{[Customers].[USA].[WA], [Store Type].[Supermarket]}\n"
                    + "Row #0: 1,118\n"
                    + "Row #1: 73,178\n");
            }
        {code}
        Show
        Julian Hyde added a comment - Trying to reproduce this. I wrote the following testcase on the FoodMart data set which seems to have all of the characteristics that allegedly cause this bug. But it works: {code:title=AccessControlTest.java|borderStyle=solid}     public void testBugMondrian935() {         final TestContext testContext =             TestContext.create(                 null, null, null, null, null,                 "<Role name='Role1'>\n"                 + " <SchemaGrant access='none'>\n"                 + " <CubeGrant cube='Sales' access='all'>\n"                 + " <HierarchyGrant hierarchy='[Store Type]' access='custom' rollupPolicy='partial'>\n"                 + " <MemberGrant member='[Store Type].[All Store Types]' access='none'/>\n"                 + " <MemberGrant member='[Store Type].[Supermarket]' access='all'/>\n"                 + " </HierarchyGrant>\n"                 + " <HierarchyGrant hierarchy='[Customers]' access='custom' rollupPolicy='partial' >\n"                 + " <MemberGrant member='[Customers].[All Customers]' access='none'/>\n"                 + " <MemberGrant member='[Customers].[USA].[WA]' access='all'/>\n"                 + " <MemberGrant member='[Customers].[USA].[CA]' access='none'/>\n"                 + " <MemberGrant member='[Customers].[USA].[CA].[Los Angeles]' access='all'/>\n"                 + " </HierarchyGrant>\n"                 + " </CubeGrant>\n"                 + " </SchemaGrant>\n"                 + "</Role>\n");         testContext.withRole("Role1").assertQueryReturns(             "select [Measures] on 0,\n"             + "[Customers].[USA].Children * [Store Type].Children on 1\n"             + "from [Sales]",             "Axis #0:\n"             + "{}\n"             + "Axis #1:\n"             + "{[Measures].[Unit Sales]}\n"             + "Axis #2:\n"             + "{[Customers].[USA].[CA], [Store Type].[Supermarket]}\n"             + "{[Customers].[USA].[WA], [Store Type].[Supermarket]}\n"             + "Row #0: 1,118\n"             + "Row #1: 73,178\n");     } {code}
        Hide
        Will Gorman added a comment -
        Hi Man Shing,

        We are unable to reproduce this case. Can you see if you can reproduce the issue with foodmart or the steelwheels dataset?

        Thanks!

        Will
        Show
        Will Gorman added a comment - Hi Man Shing, We are unable to reproduce this case. Can you see if you can reproduce the issue with foodmart or the steelwheels dataset? Thanks! Will
        Hide
        Bart Maertens added a comment -
        Will,

        We can provide a sample of our data and server config so you can easily reproduce this case.

        Regards,

        Bart
        Show
        Bart Maertens added a comment - Will, We can provide a sample of our data and server config so you can easily reproduce this case. Regards, Bart

          People

          • Assignee:
            Anthony Carter
            Reporter:
            Bart Maertens
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: