Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Severe Severe
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      These test cases demonstrate a problem with calculated
      member name lookup originally posted to the
      mondrian-devel list on Aug 6, 2004. I'm planning to
      push these tests and a fix for it as described in the mail.

       public void
      testMultipleCalculatedMembersWhichAreNotMeasures() {
        String query = "WITH" + nl +
          " MEMBER [Store].[x] AS '1'" + nl +
          " MEMBER [Product].[x] AS '1'" + nl +
          "SELECT {[Store].[x]} ON COLUMNS" + nl +
          "FROM Sales";
        String desiredResult = "Axis #0:" + nl +
          "{}" + nl +
          "Axis #1:" + nl +
          "{[Store].[x]}" + nl +
          "Row #0: 1" + nl;
        runQueryCheckResult(query, desiredResult);
       }

       /**
        * There used to be something wrong with non-measure
      calculated members
        * where the ordering of the WITH MEMBER would
      determine whether or not
        * the member would be found in the cube. This test
      would fail but the
        * previous one would work ok.
        */
       public void
      testMultipleCalculatedMembersWhichAreNotMeasures2() {
        String query = "WITH" + nl +
          " MEMBER [Product].[x] AS '1'" + nl +
          " MEMBER [Store].[x] AS '1'" + nl +
          "SELECT {[Store].[x]} ON COLUMNS" + nl +
          "FROM Sales";
        String desiredResult = "Axis #0:" + nl +
          "{}" + nl +
          "Axis #1:" + nl +
          "{[Store].[x]}" + nl +
          "Row #0: 1" + nl;
        runQueryCheckResult(query, desiredResult);
       }
       
       /*
        * This one had the same problem. It wouldn't find the
        * [Store].[All Stores].[x] member because it has the
      same leaf
        * name as [Product].[All Products].[x].
        */
       public void
      testMultipleCalculatedMembersWhichAreNotMeasures3() {
        String query = "WITH" + nl +
          " MEMBER [Product].[All Products].[x] AS '1'" + nl +
          " MEMBER [Store].[All Stores].[x] AS '1'" + nl +
          "SELECT {[Store].[All Stores].[x]} ON COLUMNS" + nl +
          "FROM Sales";
        String desiredResult = "Axis #0:" + nl +
          "{}" + nl +
          "Axis #1:" + nl +
          "{[Store].[All Stores].[x]}" + nl +
          "Row #0: 1" + nl;
        runQueryCheckResult(query, desiredResult);
       }

        Activity

        Hide
        Mondrian Importer User added a comment -
        {eburnette}, 12/13/2004: status_id, 1 |
        {eburnette}, 12/13/2004: resolution_id, 100 |
        {eburnette}, 12/13/2004: close_date, 0
        Show
        Mondrian Importer User added a comment - {eburnette}, 12/13/2004: status_id, 1 | {eburnette}, 12/13/2004: resolution_id, 100 | {eburnette}, 12/13/2004: close_date, 0
        Hide
        Mondrian Importer User added a comment -
        {eburnette}, 12/13/2004: Logged In: YES
        user_id=708305

        Fixed Query.java and added new tests in BasicQueryTest.java
        in Perforce changelist #2951. All unit tests pass.
        Show
        Mondrian Importer User added a comment - {eburnette}, 12/13/2004: Logged In: YES user_id=708305 Fixed Query.java and added new tests in BasicQueryTest.java in Perforce changelist #2951. All unit tests pass.

          People

          • Assignee:
            Unassigned User
            Reporter:
            eburnette
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: