Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: [Mondrian] mondrianolap4jmember getAncestorMembers

  1. #1
    Paul Stoellberger Guest

    Default [Mondrian] mondrianolap4jmember getAncestorMembers

    Hello

    I have implemented in PAT a routine that checks if one member is an
    ancestor of the another member.
    For that reason I use Member member.getAncestorMembers() , which works
    perfectly fine on an XMLA connection, since an XmlaOlap4jMember
    implements that method, but the MondrianOlap4jMember does not and
    throws an UnsupportedOperationException instead.

    Is there any good reason why this is not implemented? I know I could ?
    do? it myself by browsing through the getParentMember() myself but I
    thought using the getAncestorMembers() is fine as well.

    So in MondrianOlap4jMember the implementation would look like:

    public List<Member> getAncestorMembers() { final List<Member> list =
    new ArrayList<Member>();
    MondrianOlap4jMember m = getParentMember();
    while (m != null) {
    list.add(m);
    m = m.getParentMember();
    }
    return list;
    }

    I know using the getAncestorMembers() function would be expensive on
    dimensions with a large hierarchy.
    Do you think it would be more reasonable to loop through
    getParentMember myself until I find it?

    Nevertheless an implementation of getAncestorMembers() would make
    sense from my pov, unless you have a good reason why its not
    implemented yet. If I use olap4j, I don?t want to care if I use xmla
    or Mondrian connections and just use the same set of methods.

    -Paul





    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  2. #2
    Julian Hyde Guest

    Default RE: [Mondrian] mondrianolap4jmember getAncestorMembers

    I've implemented this method in mondrian's olap4j driver; change 13650.

    I also added a test to olap4j.

    Julian


    _____

    From: mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org] On
    Behalf Of Paul Stoellberger
    Sent: Thursday, May 27, 2010 7:47 AM
    To: mondrian (AT) pentaho (DOT) org
    Subject: [Mondrian] mondrianolap4jmember getAncestorMembers


    Hello

    I have implemented in PAT a routine that checks if one member is an ancestor
    of the another member.
    For that reason I use Member member.getAncestorMembers() , which works
    perfectly fine on an XMLA connection, since an XmlaOlap4jMember implements
    that method, but the MondrianOlap4jMember does not and throws an
    UnsupportedOperationException instead.

    Is there any good reason why this is not implemented? I know I could ?do? it
    myself by browsing through the getParentMember() myself but I thought using
    the getAncestorMembers() is fine as well.

    So in MondrianOlap4jMember the implementation would look like:

    public List<Member> getAncestorMembers() { final List<Member> list = new
    ArrayList<Member>();
    MondrianOlap4jMember m = getParentMember();
    while (m != null) {
    list.add(m);
    m = m.getParentMember();
    }
    return list;
    }

    I know using the getAncestorMembers() function would be expensive on
    dimensions with a large hierarchy.
    Do you think it would be more reasonable to loop through getParentMember
    myself until I find it?

    Nevertheless an implementation of getAncestorMembers() would make sense from
    my pov, unless you have a good reason why its not implemented yet. If I use
    olap4j, I don?t want to care if I use xmla or Mondrian connections and just
    use the same set of methods.

    -Paul







    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.