Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: [Mondrian] Util.lookupCompound MatchType BEFORE

  1. #1
    Richard Emberson Guest

    Default [Mondrian] Util.lookupCompound MatchType BEFORE

    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


    --
    Quis custodiet ipsos custodes:
    This email message is for the sole use of the intended recipient(s) and
    may contain confidential information. Any unauthorized review, use,
    disclosure or distribution is prohibited. If you are not the intended
    recipient, please contact the sender by reply email and destroy all
    copies of the original message.
    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  2. #2
    Zelaine Fong Guest

    Default 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 (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  3. #3
    Julian Hyde Guest

    Default RE: [Mondrian] Util.lookupCompound MatchType BEFORE

    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 (DOT) org
    > [mailto:mondrian-bounces (AT) pentaho (DOT) 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 (DOT) org
    > http://lists.pentaho.org/mailman/listinfo/mondrian
    >


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

  4. #4
    Richard Emberson Guest

    Default Re: [Mondrian] Util.lookupCompound MatchType BEFORE

    Julian,

    Should I merge my NullValueUdf test (in mondrian.udf) into
    the UdfTest.java file in mondrian.test?

    Richard


    Julian Hyde wrote:
    > 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 (DOT) org
    >> [mailto:mondrian-bounces (AT) pentaho (DOT) 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 (DOT) org
    >> http://lists.pentaho.org/mailman/listinfo/mondrian
    >>

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



    --
    Quis custodiet ipsos custodes:
    This email message is for the sole use of the intended recipient(s) and
    may contain confidential information. Any unauthorized review, use,
    disclosure or distribution is prohibited. If you are not the intended
    recipient, please contact the sender by reply email and destroy all
    copies of the original message.
    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  5. #5
    Richard Emberson Guest

    Default Re: [Mondrian] Util.lookupCompound MatchType BEFORE

    Zelaine,

    We were hoping to use the 'CurrentDateMember' udf and
    did not understand what we were getting which lead
    to my previous email.
    Do you have any suggestions as to how Util.lookupCompound()
    might be changed?
    Thanks.

    Richard

    Zelaine Fong wrote:
    > 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 (DOT) org
    > http://lists.pentaho.org/mailman/listinfo/mondrian
    >



    --
    Quis custodiet ipsos custodes:
    This email message is for the sole use of the intended recipient(s) and
    may contain confidential information. Any unauthorized review, use,
    disclosure or distribution is prohibited. If you are not the intended
    recipient, please contact the sender by reply email and destroy all
    copies of the original message.
    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  6. #6
    Zelaine Fong Guest

    Default Re: [Mondrian] Util.lookupCompound MatchType BEFORE

    I think it should be changed, as you had suggested. However, I haven't
    thought about how to actually do that :-).

    -- Zelaine

    Richard Emberson wrote:
    > Zelaine,
    >
    > We were hoping to use the 'CurrentDateMember' udf and
    > did not understand what we were getting which lead
    > to my previous email.
    > Do you have any suggestions as to how Util.lookupCompound()
    > might be changed?
    > Thanks.
    >
    > Richard
    >
    > Zelaine Fong wrote:
    >> 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 (DOT) org
    >> http://lists.pentaho.org/mailman/listinfo/mondrian
    >>

    >
    >


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

  7. #7
    Julian Hyde Guest

    Default RE: [Mondrian] Util.lookupCompound MatchType BEFORE

    > Richard wrote:
    >
    > Should I merge my NullValueUdf test (in mondrian.udf) into
    > the UdfTest.java file in mondrian.test?


    Just call it from Main. It doesn't matter if different UDFs have
    different test suites.

    Julian

    _______________________________________________
    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.