[Mondrian] Native expressions - allowing aggregated members on nativetopcount

Pedro Alves pmgalves at gmail.com
Wed Aug 29 14:37:32 EDT 2012



My goal with my previous bug is to allow native top counts to be used 
with sets.


And I'm a bit lost here...


AA)

this seems natural to me:

with set a as '([Time].[1997].[Q1] : [Time].[1997].[Q2])'
member Time.x as Aggregate(a,[Measures].[Store Sales])
member Measures.x1 as ([Time].[1997].[Q1],[Measures].[Store Sales])
member Measures.x2 as ([Time].[1997].[Q2],[Measures].[Store Sales])
set products as TopCount(Product.[Product 
Name].Members,2,Measures.[Store Sales])
SELECT
NON EMPTY products ON 1,
NON EMPTY {[Measures].[Store Sales], Measures.x1, Measures.x2} ON 0
FROM [Sales]
-- where ([Time].[1997].[Q1] : [Time].[1997].[Q2])
where Time.x


but native evaluations don't allow for calculated members. Would it be a 
good idea to try to support aggregates to be used in native evaluations?



BB)

with set a as '([Time].[1997].[Q1] : [Time].[1997].[Q2])'
member Time.x as Aggregate(a,[Measures].[Store Sales])
member Measures.x1 as ([Time].[1997].[Q1],[Measures].[Store Sales])
member Measures.x2 as ([Time].[1997].[Q2],[Measures].[Store Sales])
set products as TopCount(Product.[Product 
Name].Members,2,Measures.[Store Sales])
SELECT
NON EMPTY products ON 1,
NON EMPTY {[Measures].[Store Sales], Measures.x1, Measures.x2} ON 0
FROM [Sales]
where ([Time].[1997].[Q1] : [Time].[1997].[Q2])
-- where Time.x

This works... well, apart from the bug I mentioned before. But I don't 
like it a lot; RolapResults:executeStripe does this:

             RolapAxis axis = (RolapAxis) slicerAxis;
             TupleList tupleList = axis.getTupleList();
             for (List<Member> members : tupleList) {

And will do the entire evaluation for every member of that tupleList. 
That's a lot of processing power.


CC)

Is there any other way of doing this queries that I'm not seeing? Seems 
to me that I'm over complicating things when all I want is to start my 
query with a calculated set that I want to be natively evaluated...




-pedro





More information about the Mondrian mailing list