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

Sorting of Parent/Child Hierarchy is wrong (fix included)

    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

      If you have a parent/child-hierarchy, the members are
      always sorted by key (not by the order returned by
      SQL-statement).

      Example:

      <Dimension name="ProductCategory" caption="Product
      Category">
      <Hierarchy hasAll="true" allMemberName="All
      Categories" primaryKey="product_category">
      <Table name="product_category"/>
      <Level name="Product Category"
      column="ID_PRODUCT_CATEGORY"
      parentColumn="ID_PARENT_PRODUCT_CATEGORY"
      nameColumn="NAME_PRODUCT_CATEGORY"
      ordinalColumn="NAME_PRODUCT_CATEGORY"
      uniqueMembers="true">
      <Closure
      parentColumn="ID_PARENT_PRODUCT_CATEGORY"
      childColumn="ID_PRODUCT_CATEGORY">
      <Table
      name="olap_product_category_closure"/>
      </Closure>
      </Level>
      </Hierarchy>
      </Dimension>

      This problem could be fixed by overwriting method
      getOrdinal() in inner class RolapParentChildMember of
      class SqlMemberSource:

      public int getOrdinal()

      { return dataMember.getOrdinal(); }

      all unit-tests are still successful (at least the
      unit-tests from release 2.0.1).

        Activity

        Hide
        Mondrian Importer User added a comment -
        {jhyde}, 07/27/2006: status_id, 1 | {jhyde}

        , 07/27/2006: resolution_id, 100 |

        {jhyde}, 07/27/2006: assigned_to, 100 | {jhyde}

        , 07/27/2006: close_date, 0

        Show
        Mondrian Importer User added a comment - {jhyde}, 07/27/2006: status_id, 1 | {jhyde} , 07/27/2006: resolution_id, 100 | {jhyde}, 07/27/2006: assigned_to, 100 | {jhyde} , 07/27/2006: close_date, 0
        Hide
        Mondrian Importer User added a comment -
        {jhyde}

        , 07/27/2006: Logged In: YES
        user_id=312935

        Fixed in change 7275, will be in mondrian-2.1.2.
        Thanks for the fix!

        Julian

        Show
        Mondrian Importer User added a comment - {jhyde} , 07/27/2006: Logged In: YES user_id=312935 Fixed in change 7275, will be in mondrian-2.1.2. Thanks for the fix! Julian

          People

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

            Dates

            • Created:
              Updated:
              Resolved: