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

Julian Hyde jhyde at pentaho.com
Thu Jul 22 21:09:28 EDT 2010


Ati,
 
Can you package this up as a contribution? If you could log a bug with a
test case against foodmart we can do the rest.
 
Or if another committer could check this in, with a test csae.
 
I'm working hard turning the code upside down for mondrian-4.0 so I don't
have the cycles to keep up with issues like this.
 
Julian


  _____  

From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On
Behalf Of Ati Rosselet
Sent: Wednesday, July 21, 2010 4:39 PM
To: Mondrian developer mailing list
Subject: [Mondrian] problems.. Rollup of All, and with some hidden
elements..


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
<http://forums.pentaho.org/images/smilies/smile.gif> ) :
[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 


 Cool <http://forums.pentaho.org/images/icons/icon6.gif> 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... 
  <http://forums.pentaho.org/pentaho_images/misc/progress.gif>
<http://forums.pentaho.org/editpost.php?do=editpost&p=241049> Edit/Delete
Message  <http://forums.pentaho.org/newreply.php?do=newreply&p=241049> Reply
With Quote  <http://forums.pentaho.org/newreply.php?do=newreply&p=241049>
Multi-Quote This Message
<http://forums.pentaho.org/newreply.php?do=newreply&p=241049> Quick reply to
this message 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100722/0af46f4b/attachment.html 


More information about the Mondrian mailing list