[Mondrian] Non Empty result

Julian Hyde julianhyde at speakeasy.net
Fri Jul 6 15:35:08 EDT 2007

My main concerns are that we impact the behavior of existing apps, and that
the implementation requires widespread code changes which will be difficult
to maintain or may introduce bugs. So, you should create a property which is
off by default, and add a testcase which shows the behavior when the
property is off and on, and check back with me if the you need to change
more than a few lines of code in one or two places.
The change in behavior is most concisely expressed in a change in the
behavior of the IsEmpty function, so can you update its description to
mention the property. (That description is automatically generated into
mdx.html when I make a release.)
Then you need to make sure that the NON EMPTY clause and the
NonEmptyCrossJoin function are consistent with the behavior of the IsEmpty
Also, make sure that it works correctly in virtual cubes: where you have a
calculated member which combines a measure from cube A with a measure from
cube B and a constant.
My hunch is that you may need to spend a considerable amount of effort
getting this to play nice with the native SQL support. Please run the test
suite for each boolean combination of the properties which enable/disable
native SQL generation, and with/without aggregate tables.
I'm worried that this change will require a lot of hacking to internals. The
code which generates native SQL, and which recognizes aggregates, is already
brittle. I have a hunch that a naive implementation, looking top-down for
constants in calculated members, will involve quite a bit of hacking. A more
elegant approach might be to attack lower down the evaluation stack: wait
until the expression has been expanded into stored measures, each of which
has a cube (and hence a RolapStar), and look for parts of the expression
which have no cube/RolapStar.


From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On
Behalf Of Thiyagu Palanisamy
Sent: Friday, July 06, 2007 5:19 AM
To: mondrian at pentaho.org
Subject: [Mondrian] Non Empty result 

Hi Julian, 
 Cognos is firing MDX with calculated member with constant value in the
query, because of which non empty filter is not working. 

WITH MEMBER [Measures].[COG_OQP_INT_t2] AS '1' 
SELECT {[Measures].[COG_OQP_INT_t1], [Measures].[Customer Count]} ON AXIS(0)
FROM [Sales] 

If this change will be useful for other users also then we can extend the
behaviour of NonEmptyResult class to handle this special condition. And
treat calculated members with constant values as empty cell value if all
other members are empty. This would be an optional functionality. 

If this requirement is very specific then we need to keep this as a special
patch for Cognos only. 

What is your opinion? 


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

More information about the Mondrian mailing list