Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: About NativizeSet, Is this a bug?

  1. #1
    Join Date
    Mar 2013
    Posts
    3

    Exclamation About NativizeSet, Is this a bug?

    I ran the NativizeSetFunDefTest class.
    The testcase "testTopCountDoesNotGetTransformed" can be passed which tranform "
    select NativizeSet(Crossjoin([Gender].[Gender].members,TopCount({[Marital Status].[Marital Status].members},1,[Measures].[Unit Sales])) ) on 0,
    {[Measures].[Unit Sales]} on 1
    FROM [Sales]"
    to
    "with member [Gender].[_Nativized_Member_Gender_Gender_] as '[Gender].DefaultMember'
    set [_Nativized_Set_Gender_Gender_] as '{[Gender].[_Nativized_Member_Gender_Gender_]}'
    member [Gender].[_Nativized_Sentinel_Gender_(All)_] as '101010'
    select NON EMPTY NativizeSet(Crossjoin([_Nativized_Set_Gender_Gender_], TopCount({[Marital Status].[Marital Status].Members}, 1, [Measures].[Unit Sales]))) ON COLUMNS,
    NON EMPTY {[Measures].[Unit Sales]} ON ROWS from [Sales]".
    This tranformation is correct, but these two mdx string return two different results.

    What does 'NativizeSet' really mean, and it's function? who can explain it?
    Another testcase is NativizeSetFunDefTest.testAggWithEnumMembers. When ran it, will got a failure due to different results.
    Thanks very much!!!

  2. #2
    Join Date
    Jan 2013
    Posts
    796

    Default

    NativizeSet is intended to natively handle sets which are more complex than can be easily supported with the standard native infrastructure (native.crossjoin, native.filter, etc.) It also includes a threshold to skip native eval if a set is too small to be worth the extra fact queries. The basic approach it takes is to swap in a constant for the expressions it knows it can nativize (e.g. Level.members). It then evaluates the much smaller set, non-natively. Finally it assembles the natively evaluated and non-natively evaluated components in a single tuple list. This is conceptually similar to the ExpandNonNative functionality, but attempts to do all native evaluation in a single pass up front. The transformed query you referenced is only be used internally and would not actually be what produces the resulting set.

    This is very much a "use-at-your-own-risk" function. It's been extensively tested with Cognos style MDX, which is particularly nasty for native eval, but has not been used much for other purposes. If you have a set which is not handled well by standard native evaluation it may be worth trying.

  3. #3
    Join Date
    Mar 2013
    Posts
    3

    Default

    Quote Originally Posted by mcampbell View Post
    NativizeSet is intended to natively handle sets which are more complex than can be easily supported with the standard native infrastructure (native.crossjoin, native.filter, etc.) It also includes a threshold to skip native eval if a set is too small to be worth the extra fact queries. The basic approach it takes is to swap in a constant for the expressions it knows it can nativize (e.g. Level.members). It then evaluates the much smaller set, non-natively. Finally it assembles the natively evaluated and non-natively evaluated components in a single tuple list. This is conceptually similar to the ExpandNonNative functionality, but attempts to do all native evaluation in a single pass up front. The transformed query you referenced is only be used internally and would not actually be what produces the resulting set.

    This is very much a "use-at-your-own-risk" function. It's been extensively tested with Cognos style MDX, which is particularly nasty for native eval, but has not been used much for other purposes. If you have a set which is not handled well by standard native evaluation it may be worth trying.
    Thanks for your reply. Is there any more documents about those functions except mondrian doc? Thanks

  4. #4
    Join Date
    Jan 2013
    Posts
    796

    Default

    Sorry, there's not much documentation on the NativizeSet function and other native functionality, apart from what's in the config guide.

Tags for this Thread

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.