Pentaho Analysis - Mondrian

CrossJoin non empty optimizer eliminates calculated member

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Critical Critical
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: Future Release
  • Component/s: None
  • Labels:
    None

Description

With NON EMPTY (mondrian.rolap.nonempty) behavior set to true the following mdx return no result. The same mdx returns valid result when NON EMPTY is turned off


===================
WITH
                MEMBER Measures.Calc AS '[Measures].[Profit] * 2', SOLVE_ORDER=1000
                MEMBER Product.Conditional as 'Iif(Measures.CurrentMember IS Measures.[Calc], +
                Measures.CurrentMember, null)', SOLVE_ORDER=2000
                SET [S2] AS '{[Store].MEMBERS}'
                SET [S1] AS 'CROSSJOIN({[Customers].[All Customers]},{Product.Conditional})'
                SELECT
                NON EMPTY GENERATE( {Measures.[Calc]},
                          CROSSJOIN( HEAD( {([Measures].CURRENTMEMBER)},
                                           1
                                         ),
                                     {[S1]}
                                   ),
                                   ALL
                                  )
                                                   ON AXIS(0),
                NON EMPTY [S2] ON AXIS(1)
                FROM [Sales]
===================


I have written a unit test and identified a possible fix for this. Please see the attached patch.

Any ideas for a better fix?

-Ajit

Activity

Hide
Mondrian Importer User added a comment - 01/Jan/70 12:00 AM
{ajit_joglekar}, 09/10/2007: IP, Artifact Created: 125.18.63.200 |
{ajit_joglekar}, 09/10/2007: File Added, 244984: changelist9867.tar.gz |
{jhyde}, 09/10/2007: IP, Comment Added: 64.81.57.79 |
{jhyde}, 09/10/2007: assigned_to, 100 |
{ajit_joglekar}, 09/11/2007: IP, Comment Added: 125.18.63.213 |
{jhyde}, 09/12/2007: IP, Comment Added: 66.92.12.96 |
{jhyde}, 09/12/2007: assigned_to, 312935 |
{willgorman}, 01/11/2008: priority, 5 |
{willgorman}, 01/11/2008: assigned_to, 100
Show
Mondrian Importer User added a comment - 01/Jan/70 12:00 AM {ajit_joglekar}, 09/10/2007: IP, Artifact Created: 125.18.63.200 | {ajit_joglekar}, 09/10/2007: File Added, 244984: changelist9867.tar.gz | {jhyde}, 09/10/2007: IP, Comment Added: 64.81.57.79 | {jhyde}, 09/10/2007: assigned_to, 100 | {ajit_joglekar}, 09/11/2007: IP, Comment Added: 125.18.63.213 | {jhyde}, 09/12/2007: IP, Comment Added: 66.92.12.96 | {jhyde}, 09/12/2007: assigned_to, 312935 | {willgorman}, 01/11/2008: priority, 5 | {willgorman}, 01/11/2008: assigned_to, 100
Hide
Mondrian Importer User added a comment - 01/Jan/70 12:00 AM
{jhyde}, 09/10/2007: Logged In: YES
user_id=312935
Originator: NO

Thanks - I am incorporating the fix now.

One thing: the behavior is the same whatever the value of mondrian.rolap.nonempty. Maybe your were thinking of some other property, say mondrian.native.nonempty.enable?
Show
Mondrian Importer User added a comment - 01/Jan/70 12:00 AM {jhyde}, 09/10/2007: Logged In: YES user_id=312935 Originator: NO Thanks - I am incorporating the fix now. One thing: the behavior is the same whatever the value of mondrian.rolap.nonempty. Maybe your were thinking of some other property, say mondrian.native.nonempty.enable?
Hide
Mondrian Importer User added a comment - 01/Jan/70 12:00 AM
{ajit_joglekar}, 09/11/2007: Logged In: YES
user_id=1758904
Originator: YES

Julian,

Since the MDX explicitly has NON EMPTY on both axis I suppose turning of the property (mondrian.rolap.nonempty) at global level does not make any difference. The NON EMPTY on both axis can be removed to see the effect of this property

I feel it makes sense to have NON EMPTY in the query as part of the test so that we are not dependent on the global property for the test to correctly verify the fix.

-Ajit
Show
Mondrian Importer User added a comment - 01/Jan/70 12:00 AM {ajit_joglekar}, 09/11/2007: Logged In: YES user_id=1758904 Originator: YES Julian, Since the MDX explicitly has NON EMPTY on both axis I suppose turning of the property (mondrian.rolap.nonempty) at global level does not make any difference. The NON EMPTY on both axis can be removed to see the effect of this property I feel it makes sense to have NON EMPTY in the query as part of the test so that we are not dependent on the global property for the test to correctly verify the fix. -Ajit
Hide
Mondrian Importer User added a comment - 01/Jan/70 12:00 AM
{jhyde}, 09/12/2007: Logged In: YES
user_id=312935
Originator: NO

I ran the regression suite, and the fix you supplied breaks 5 existing tests.

I have checked in your testcase, disabled, in change 9876. Can you supply a fix which keeps the existing tests working?
Show
Mondrian Importer User added a comment - 01/Jan/70 12:00 AM {jhyde}, 09/12/2007: Logged In: YES user_id=312935 Originator: NO I ran the regression suite, and the fix you supplied breaks 5 existing tests. I have checked in your testcase, disabled, in change 9876. Can you supply a fix which keeps the existing tests working?
Hide
Sebastian Rapp added a comment - 13/Sep/11 2:27 AM
I have a similiar NON EMPTY MDX query where one row with calculated members is deleted.
I hope a working fix will soon be implemented in the next release.
Show
Sebastian Rapp added a comment - 13/Sep/11 2:27 AM I have a similiar NON EMPTY MDX query where one row with calculated members is deleted. I hope a working fix will soon be implemented in the next release.

People

Vote (3)
Watch (1)

Dates

  • Created:
    10/Sep/07 2:21 PM
    Updated:
    13/Sep/11 2:27 AM