<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6001.18023" name=GENERATOR><!--[if !mso]>
<STYLE>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</STYLE>
<![endif]-->
<STYLE>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Verdana;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:Verdana;
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Verdana;
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2>Timothy,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2>The change looks good, but you need to tie up a few loose
ends to be tied up before I can accept the contribution:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2>1. The unit test cases need some work. I enabled the tests
in SolveOrderScopeIsolationTest, and most worked if I preceded them with
a check that SolveOrderMode==scoped. But
testOverrideOverCubeMemberHappensWithScopeIsolation still gives errors; can't
figure out whether it's to do with case sensitivity.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2>And, can you create some cases that test the behavior when
SolveOrderMode==absolute. This will be especially important when scoped becomes
the default behavior. Maybe make each test case into an 'if ... else' with
alternative outputs.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2>2. The description of the property in mondrian.properties
and MondrianProperties.java needs a little more information, because the average
DBA would not know what SS2K behavior was (or SS2K was, for that matter). The
information in your email below would do just fine.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2>3. Please put the same property information into
configuration.html.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2>4. For future changes, please keep those lines to 80
characters, and use <p> to delimit paragraphs in
javadoc.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2>See attached a new change list with my
modifications.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2>All,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2>Any opinions what should be the default behavior? I'm
inclined to think that mondrian should use scoped solve-order (like Analysis
Services 2005) by default.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=366284123-19052008><FONT face=Verdana
color=#000080 size=2>Julian</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> mondrian-bounces@pentaho.org
[mailto:mondrian-bounces@pentaho.org] <B>On Behalf Of
</B>timothy.lambert@thomsonreuters.com<BR><B>Sent:</B> Monday, May 12, 2008
12:08 PM<BR><B>To:</B> mondrian@pentaho.org<BR><B>Subject:</B> [Mondrian]
Calculated Member Solve Order & AggregateFunctionHandling
<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Verdana color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Verdana">Sorry folks …
hopefully this third time will be charmed. <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Verdana color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Verdana color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Verdana">This time with a
subject *<B><SPAN style="FONT-WEIGHT: bold">and</SPAN></B>* the code
attachment.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Verdana color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">
mondrian-bounces@pentaho.org [mailto:mondrian-bounces@pentaho.org] <B><SPAN
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Lambert, Timothy<BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Monday, May 12, 2008 3:05
PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
mondrian@pentaho.org<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B>
[Mondrian] Calculated Member Solve Order & Aggregate FunctionHandling
</SPAN></FONT><o:p></o:p></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><B><FONT face=Verdana size=3><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 12pt; FONT-FAMILY: Verdana">Calculated
Member Solve Order & Aggregate Function Handling
<o:p></o:p></SPAN></FONT></B></P>
<P class=MsoNormal><B><FONT face=Verdana size=3><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 12pt; FONT-FAMILY: Verdana">SSAS2005 vs.
SSAS2000 vs. Mondrian<o:p></o:p></SPAN></FONT></B></P>
<P class=MsoNormal><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><B><FONT face=Verdana size=3><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 12pt; FONT-FAMILY: Verdana">Background<o:p></o:p></SPAN></FONT></B></P>
<P class=MsoNormal><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">This proposal was seeded by the
R&D of others.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Following are links to some of
that work…<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">http://forums.pentaho.org/showthread.php?t=60654<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">http://777eisenhower.blogspot.com/2008/03/analysis-services-2000-vs-2005.html<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><B><FONT face=Verdana
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></B></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><B><FONT face=Verdana
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Verdana">SOLVE_ORDER
Calculated Member Property<o:p></o:p></SPAN></FONT></B></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Definition: The order of
evaluation (from highest to lowest solve order) and calculation (from lowest
to highest solve order) for calculated members, custom members, custom rollup
formulas, and calculated cells in a single calculation pass of a
multidimensional cube. Solve order is used to determine formula precedence
when calculating values for cells in multidimensional cubes, but only within a
single calculation pass.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">SSAS2000 Behavior: The
SOLVE_ORDER value is absolute regardless of where it is defined; e.g. a query
defined calculated member with a SOLVE_ORDER of 1 always takes precedence over
a cube defined value of 2.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">SSAS2005 Behavior: By
default, cube calculated members are resolved before any session scope
calculated members, and session scope members are resolved before any query
defined calculation. The SOLVE_ORDER value only applies within the scope
in which it was defined. <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Achieving SSAS2000 Behavior on
SSAS2005: Using the SCOPE_ISOLATION=CUBE property in a query calculated
member definition will put the query defined member into cube scope. So
effectively solve_order is treated like an SSAS2000 absolute value since all
members are treated as if they were defined in the same
scope.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><B><FONT face=Verdana
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Aggregate
Function<o:p></o:p></SPAN></FONT></B></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Definition: Returns a
number that is calculated by aggregating over the cells returned by the set
expression. <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">The Aggregation function is
designed to be used against base measures.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">SSAS2000 Behavior: The
SOLVE_ORDER value must be manually applied such that aggregate values are
solved before other related calculated members.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">SSAS2005 Behavior: The
aggregate function is always applied to base members; i.e. as if solve_order
was defined to be the lowest value in a given evaluation in a SSAS2000
sense.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><B><FONT face=Verdana
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Current
Mondrian Behavior<o:p></o:p></SPAN></FONT></B></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><B><FONT face=Verdana
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></B></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">In regard to solve_order and
Aggregate function handling, Mondrian behaves like
SSAS2000.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">During the evaluation of a given
cell, if there are multiple calculated members in the evaluation context then
the member with the highest solve_order is evaluated. The other
calculated members with lower solve_order values stay within the evaluation
context, and are evaluated during the processing of the calculated member with
the higher solve_order.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Through this recursive process,
the calculated members with lower solve_order values get calculated before
those with higher values.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><B><FONT face=Verdana size=3><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 12pt; FONT-FAMILY: Verdana">Mondrian
Issue<o:p></o:p></SPAN></FONT></B></P>
<P class=MsoNormal><B><FONT face=Verdana size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></B></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">For use with certain reporting
clients (e.g. Cognos), it is better for Mondrian to behave like SSAS2005
rather than SSAS2000 in regard to solve order and aggregate function
evaluation. <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal
style="MARGIN-BOTTOM: 12pt; MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0in; mso-margin-top-alt: 0in"><FONT
face=Verdana size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Note
that some reporting clients (e.g. Cognos) do not take advantage of the
SSAS2005 SCOPE_ISOLATION property, so support for it is not considered
critically important.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><B><FONT face=Verdana size=3><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 12pt; FONT-FAMILY: Verdana">Proposed
Mondrian Changes<o:p></o:p></SPAN></FONT></B></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">
<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><B><FONT face=Verdana
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Verdana">High
Level<o:p></o:p></SPAN></FONT></B></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">The proposal involves enhancing
Mondrian to optionally behave like SSAS2005 rather than SSAS2000 in regard to
solve order. <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">The option is controlled using
the MondrianProperties entry S</SPAN></FONT><FONT face="Courier New"
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">olveOrderMode=absolute|scoped</SPAN></FONT><FONT
face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">. The current Mondrian
solve order behavior remains the default; ‘absolute’. The SSAS2005
behavior can be turned on with the value of ‘scoped’. One can achieve
SSAS2005 SCOPE_ISOLATION=CUBE semantics by using 'absolute'
mode.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">While preserving old behavior as
a default is usually desirable, in this case it is recommended that Mondrian
adopt the SSAS2005 behavior as the default.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">The implementation of the
proposal is based on the same sort of logic one uses when manually applying
the solve_order property to get the desired SSAS2005-like behavior with
current Mondrian.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">The 'scoped' solve order mode
code determines the highest solve order based
on…<BR> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal
style="MARGIN-BOTTOM: 12pt; MARGIN-LEFT: 1in; TEXT-INDENT: -0.25in; MARGIN-RIGHT: 0in; mso-margin-top-alt: 0in"><FONT
face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">- If the calculated
member is involved with an aggregate function. <BR><BR>Aggregation
function based calculations are calculated first.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal
style="MARGIN-BOTTOM: 12pt; MARGIN-LEFT: 1in; TEXT-INDENT: -0.25in; MARGIN-RIGHT: 0in; mso-margin-top-alt: 0in"><FONT
face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">- The location of
the calculated member definition; i.e. its scope. <BR><BR>Cube scope members
are calculated after Aggregate function based calculations.
<BR><BR>Query scope members are calculated after cube scope
calculations.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in; TEXT-INDENT: -0.25in"><FONT
face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">- The solve_order
property. <BR><BR>This property is only used to order calculations
within a given scope.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><B><FONT face=Verdana
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></B></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><B><FONT face=Verdana
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Code
Changes<o:p></o:p></SPAN></FONT></B></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Attached to this email – the
archive was built with the packChange script.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">The
RolapEvaluator.peekCalcMember method now invokes one of two methods for
determining the highest solve order for two or more calculated
members. One of these methods implements the “absolute” algorithm
and the other implements the “scoped” algorithm.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Determining cube and query scope
is easy since there is an already defined class method for determining if a
member is defined in a query. If it’s not defined in the query then it
must be defined in the cube.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Determining relative solve_order
is also trivial since that property is readily available for a given
calculated member.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Determining if the member is
part of an aggregate function is a little more difficult. There are (at
least) two ways to go about this.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">In the proposed solution, there
is a new RolapEvaluator method that traverses the expression graph associated
with a calculated member explicitly looking for an aggregate
function.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">An alternate solution performed
a full evaluation of the calculated member in order to look for an aggregate
function. After the evaluation, a flag was checked to see if an
aggregate function was found.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><B><FONT face=Verdana
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></B></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><B><FONT face=Verdana
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Unit
Tests<o:p></o:p></SPAN></FONT></B></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><B><FONT face=Verdana
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></B></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">A JUnit test
(SolveOrderScopeIsolationTest) was recently contributed to the Mondrian
project. These test cases expect AS2005 behavior and as such fail with
the current Mondrian. So this test is not normally setup to run with the
regular regression suite. <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">When this test is enabled, the
proposed implementation with the new AS2005 solve order behavior passes all
test cases. <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Note there is one exception in
which Mondrian fails regardless of SolveOrderMode. There seems to be an
MDX syntax problem in one of the test cases.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Also note there is one test case
that passes for both the old and new behavior.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">There is another test case that
passes for current Mondrian but fails for the new solve order behavior.
The test case is Mondrian.test.NamedSetTest.testOrderedNamedSet. The
test case explicitly expects SSAS2000 behavior and as such should fail with
the new AS2005 behavior.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>