[Mondrian] Util.lookupCompound MatchType BEFORE

Julian Hyde julianhyde at speakeasy.net
Mon Mar 5 12:45:04 EST 2007


Sounds like this problem could be expressed as an MDX testcase. Whoever
fixes this, please add an MDX test to UdfTest.

("You know my methods, Watson.")

> -----Original Message-----
> From: mondrian-bounces at pentaho.org 
> [mailto:mondrian-bounces at pentaho.org] On Behalf Of Zelaine Fong
> Sent: Monday, March 05, 2007 9:04 AM
> To: Mondrian developer mailing list
> Subject: Re: [Mondrian] Util.lookupCompound MatchType BEFORE
> 
> Richard,
> 
> I believe I put in that code.  And you're right.  It should 
> be returning 
> the last child of bestChild's previous sibling.  Is this 
> something you 
> need a fix for a right away?
> 
> -- Zelaine
> 
> Richard Emberson wrote:
> >
> > This is a question concerning what happens when the
> > match type is MatchType.BEFORE.
> > In the method Util.lookupCompound(), there is a comment:
> >
> >   // if we're doing a non-exact match, and we find a non-exact
> >   // match, then for an after match, return the first child
> >   // of each subsequent level; for a before match, return the
> >   // last child
> >
> > I understand why the match type AFTER returns the next child,
> > childrenList.get(0);
> > , but why for match type BEFORE is the last child in the same
> > list returned,
> > childrenList.get(children.length - 1);
> >
> > Why is it not the last child in the bestChild's previous
> > sibling returned?
> >
> > Richard
> >
> >
> 
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
> 




More information about the Mondrian mailing list