[Mondrian] problems.. Rollup of All, and with some hidden elements..

Ati Rosselet ati.rosselet at gmail.com
Wed Jul 21 19:39:15 EDT 2010


Problem solved - mainly
Problem was caused by equals function of LimitedRollupMember

memberGrantMap.get(m) failed if element in map was of type
mondrian.rolap.RolapCubeMember and m was of type LimitedRollupMember.
This means that get failed since equals was incorrect

My new function (not perfect.. but mostly working ) :
[code]
public boolean equals(Object o) {
            if (o==null) return false;

            return ((o instanceof LimitedRollupMember &&
((LimitedRollupMember) o).member.equals(member))
                || (o instanceof RolapCubeMember && o.equals(member)));
        }
[/code]

also
 [image: Cool] *bug - if I'm correct*
------------------------------
 mondrian.rolap.RolapImpl.java
was
 Code:

           if (m==member)) {
                  return Access.CUSTOM;
           }
          if (m!=grantedMember) && memberGrants.get(m)!=  null) {
                  break;
          }

 should be
 Code:

          if (m.equals(member)) {
                  return Access.CUSTOM;
           }
          if (!m.equals(grantedMember) && memberGrants.get(m)!= null) {
                  break;
          }

 This fixed a problem I was having w/o an ALL element - some of my elements
kept disappearing. I debugged to see that the unique names were matching,
but the == returned false(wrong), while .equals() was true (correct)

Just my 2Cents worth .. still having the problem with partial not being
handled by the ALL element though...
 [image: Edit/Delete
Message]<http://forums.pentaho.org/editpost.php?do=editpost&p=241049>
[image:
Reply With Quote]<http://forums.pentaho.org/newreply.php?do=newreply&p=241049>
[image:
Multi-Quote This
Message]<http://forums.pentaho.org/newreply.php?do=newreply&p=241049>
[image:
Quick reply to this
message]<http://forums.pentaho.org/newreply.php?do=newreply&p=241049>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100722/001b6ed3/attachment.html 


More information about the Mondrian mailing list