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

NullPointerException for certain mdx using [Sales 2]

    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

      RolapStar #73 introduced this bug

      Following mdx fails with NullPointerException when run in cmdrunner:

      with member [Time].[COG_OQP_USR_Aggregate(Time)] as 'Aggregate(

      {[Time].DefaultMember}

      )', SOLVE_ORDER = 4.0
      select NON EMPTY

      {[Product].[Product Department].Members}

      DIMENSION PROPERTIES PARENT_LEVEL, PARENT_UNIQUE_NAME ON COLUMNS,
      NON EMPTY [Time].Members}, {[Time].[COG_OQP_USR_Aggregate(Time)] DIMENSION PROPERTIES PARENT_LEVEL, PARENT_UNIQUE_NAME ON ROWS,

      {[Measures].[Unit Sales]}

      DIMENSION PROPERTIES PARENT_LEVEL, PARENT_UNIQUE_NAME ON PAGES
      from [Sales 2];

      RolapHierachy #61 rewriteRelationWithAliases throws null pointer exeception at line 621 as starTable instance is null

      RolapStar.cubeToRelationNamesToStarTableMapMap does not have any entry added for [Sales 2].

      If the [Sales 2] cube definition is moved to the 1st position in FoodMart.xml then this query executes successfully.

      In RolapStar - synchronized Table addJoin() moving following lines

      Map<String, RolapStar.Table> map =
      star.getRelationNamesToStarTableMap(cube);
      String relationNames =
      relation.toString() + relation.getAlias();
      map.put(relationNames, starTable);

      after if (starTable == null) block seems to resolve this issue

        Activity

        Hide
        Mondrian Importer User added a comment -
        {ajit_joglekar}

        , 05/03/2007: IP, Artifact Created: 125.18.63.115 |

        {ruchen}, 05/11/2007: IP, Comment Added: 204.69.218.177 | {jhyde}, 05/11/2007: IP, Comment Added: 66.92.12.96 | {jhyde}, 05/11/2007: assigned_to, 100 | {ruchen}

        , 05/11/2007: IP, Comment Added: 70.143.76.171 |

        {ruchen}, 05/11/2007: status_id, 1 | {ruchen}

        , 05/11/2007: close_date, 0

        Show
        Mondrian Importer User added a comment - {ajit_joglekar} , 05/03/2007: IP, Artifact Created: 125.18.63.115 | {ruchen}, 05/11/2007: IP, Comment Added: 204.69.218.177 | {jhyde}, 05/11/2007: IP, Comment Added: 66.92.12.96 | {jhyde}, 05/11/2007: assigned_to, 100 | {ruchen} , 05/11/2007: IP, Comment Added: 70.143.76.171 | {ruchen}, 05/11/2007: status_id, 1 | {ruchen} , 05/11/2007: close_date, 0
        Hide
        Mondrian Importer User added a comment -
        {ruchen}

        , 05/11/2007: Logged In: YES
        user_id=1750725
        Originator: NO

        This is caused by the table alias fix (9156). The cube "Sales 2" does not introduce additional joins to the star. As ajit_joglekar points out table alias names are only registered when a new join is added(it explains moving cube definition makes the problem disappear). This behavior is incorrect. The fix shouldbe to register table aliases for cubes regardless if the table introduces a new join or not.

        Show
        Mondrian Importer User added a comment - {ruchen} , 05/11/2007: Logged In: YES user_id=1750725 Originator: NO This is caused by the table alias fix (9156). The cube "Sales 2" does not introduce additional joins to the star. As ajit_joglekar points out table alias names are only registered when a new join is added(it explains moving cube definition makes the problem disappear). This behavior is incorrect. The fix shouldbe to register table aliases for cubes regardless if the table introduces a new join or not.
        Hide
        Mondrian Importer User added a comment -
        {jhyde}

        , 05/11/2007: Logged In: YES
        user_id=312935
        Originator: NO

        Rushan, What's the next step? I'm going to assign this to you. Let me know if you're not able to fix it.

        Show
        Mondrian Importer User added a comment - {jhyde} , 05/11/2007: Logged In: YES user_id=312935 Originator: NO Rushan, What's the next step? I'm going to assign this to you. Let me know if you're not able to fix it.
        Hide
        Mondrian Importer User added a comment -
        {ruchen}

        , 05/11/2007: Logged In: YES
        user_id=1750725
        Originator: NO

        Forgot to assign to myself. Fixed in changelist 9244.

        Show
        Mondrian Importer User added a comment - {ruchen} , 05/11/2007: Logged In: YES user_id=1750725 Originator: NO Forgot to assign to myself. Fixed in changelist 9244.
        Hide
        Gretchen Moran added a comment -

        Temporary open to allow setting the resolution field.

        Show
        Gretchen Moran added a comment - Temporary open to allow setting the resolution field.
        Hide
        Gretchen Moran added a comment -

        Bulk changed the resolution field from NONE to FIXED in order for JIRA to report properly.

        Show
        Gretchen Moran added a comment - Bulk changed the resolution field from NONE to FIXED in order for JIRA to report properly.

          People

          • Assignee:
            Rushan Chen
            Reporter:
            ajit_joglekar
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: