<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><base href="x-msg://4445/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>(Taking this discussion public.)</div><div><br></div><div>On Jan 22, 2013, at 3:18 PM, Matt Campbell &lt;<a href="mailto:mcampbell@pentaho.com">mcampbell@pentaho.com</a>&gt; wrote:</div><div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">I’ve done some more testing with the change we discussed in Monday’s hangout—i.e. swapping out the slicer axis set with a dummy placeholder when a compound slicer is present, after the aggregate calc for the slicer set has been created and pushed to the evaluator.&nbsp; This change would be in the RolapResult constructor in the “Execute Slicer” section.&nbsp; The change produces correct results for the use case described in MONDRIAN-936, and addresses other cases where multiple calculated members are present in the slicer.&nbsp; It also appears to jive well with native constraint evaluation and causes no failed tests in the suite.&nbsp; I’m still not sure if it’s the best solution, though, and I’ve been looking through the other slicer related bugs to see whether we might be painting ourselves into a corner.<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">There are several Jira cases involving the slicer incorrectly overriding calculated members on the axes.&nbsp; For example:<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9.5pt; font-family: Consolas; color: blue; ">with</span><span style="font-size: 9.5pt; font-family: Consolas; "><span class="Apple-converted-space">&nbsp;</span><span style="color: blue; ">member</span><span class="Apple-converted-space">&nbsp;</span>measures.[Store Sales Q1]<span class="Apple-converted-space">&nbsp;</span><span style="color: blue; ">as</span><span class="Apple-converted-space">&nbsp;</span><span style="color: rgb(163, 21, 21); ">'(measures.[Store Sales], [Time].[1997].[Q1])'</span><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9.5pt; font-family: Consolas; color: blue; ">select</span><span style="font-size: 9.5pt; font-family: Consolas; "><span class="Apple-converted-space">&nbsp;</span>{ measures.[Store Sales], measures.[Store Sales Q1] }<span class="Apple-converted-space">&nbsp;</span><span style="color: blue; ">on</span><span class="Apple-converted-space">&nbsp;</span>0<span class="Apple-converted-space">&nbsp;</span><span style="color: blue; ">from</span><span class="Apple-converted-space">&nbsp;</span>sales<span class="Apple-converted-space">&nbsp;</span><span style="color: blue; ">where</span><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9.5pt; font-family: Consolas; ">{ [Time].[1997].[Q2],[Time].[1997].[Q3] }<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9.5pt; font-family: Consolas; ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">This query will override the [Q1] context of the [Store Sales Q1] measure, and both measures end up having the same value (the rollup of [Q2] and [Q3]).&nbsp; This is similar to MONDRIAN-824, 1226 and 1095.<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">MONDRIAN-555 also seems important- that’s the one about potential over count with compound slicers (if you do something like slice on {[Product].[Food], [Product].[Food].[Cheese]}, for example.&nbsp;<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Another case I was thinking about involves .CurrentMember.&nbsp; CurrentMember really doesn’t make sense when applied to any dimension that also appears in a compound slicer.&nbsp; Analysis Services explicitly prevents this and gives an error.&nbsp; Right now Mondrian will evaluate CurrentMember to be the member from the first tuple in the slicer set.&nbsp; E.g. in the following query Time.CurrentMember evaluates to [Q4].<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9.5pt; font-family: Consolas; color: blue; ">with</span><span style="font-size: 9.5pt; font-family: Consolas; "><span class="Apple-converted-space">&nbsp;</span><span style="color: blue; ">member</span><span class="Apple-converted-space">&nbsp;</span>measures.[drink sales previous period]<span class="Apple-converted-space">&nbsp;</span><span style="color: blue; ">as</span><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(163, 21, 21); ">'( Time.CurrentMember.lag(1), [Product].[All Products].[Drink], measures.[unit sales] )'</span><span style="font-size: 9.5pt; font-family: Consolas; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9.5pt; font-family: Consolas; color: blue; ">member</span><span style="font-size: 9.5pt; font-family: Consolas; "><span class="Apple-converted-space">&nbsp;</span>measures.[drink sales current period]<span class="Apple-converted-space">&nbsp;</span><span style="color: blue; ">as</span><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(163, 21, 21); ">'( Time.CurrentMember, [Product].[All Products].[Drink], measures.[unit sales] )'</span><span style="font-size: 9.5pt; font-family: Consolas; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9.5pt; font-family: Consolas; color: blue; ">select</span><span style="font-size: 9.5pt; font-family: Consolas; "><span class="Apple-converted-space">&nbsp;</span>{ measures.[drink sales previous period], measures.[drink sales current period] }<span class="Apple-converted-space">&nbsp;</span><span style="color: blue; ">on</span><span class="Apple-converted-space">&nbsp;</span>0<span class="Apple-converted-space">&nbsp;</span><span style="color: blue; ">from</span><span class="Apple-converted-space">&nbsp;</span>sales<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9.5pt; font-family: Consolas; color: blue; ">where</span><span style="font-size: 9.5pt; font-family: Consolas; "><span class="Apple-converted-space">&nbsp;</span>{ [Time].[1997].[Q4],[Time].[1997].[Q3] }<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9.5pt; font-family: Consolas; ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">It’s not clear to me whether the change I suggested for MONDRIAN-936 will get us closer to a solution to these other problems, or whether it will end up being at odds.&nbsp; Julian- in MONDRIAN-555 you describe an alternate implementation that views the tuples in the slicer set as a collection of predicates pushed to the WHERE.&nbsp; Is that something we should be thinking about?&nbsp;</span></div></div></div></blockquote><div><br></div><div>I don't think that MONDRIAN-555 is that important. I mean, not important enough that it should influence the architecture. I logged the bug for full disclosure. Let's choose the architecture that works for the "80%" cases, and we can find a workaround that makes 555 work.<div><br></div><div>An MDX "WHERE" clause should be evaluated like predicates.</div><div><br></div><div>&nbsp; MDX: WHERE {[Foo].[X], [Foo].[Y]}</div><div><br></div><div>should be similar to</div><div><br></div><div>&nbsp; SQL: WHERE foo = 'X' OR foo = 'Y'<br><div><br></div><div>It's difficult to evaluate</div><div><br></div><div><div>&nbsp; MDX: WHERE {[Foo].[X], [Foo].[Y], [Foo].[X]}</div><div><br></div><div>in the same way, but much less important.</div><div><br></div><div>I agree that .CurrentMember should give an error when invoked on composite members in the slicer. (It's like asking Shroedinger's cat whether it's alive.) The error should allow people to realise they are doing something dumb quicker. Can you log a jira case for it, please?</div><div><br></div><div>I don't know exactly what you mean by "<span style="color: rgb(31, 73, 125); font-family: Calibri, sans-serif; font-size: 11pt; ">swapping out the slicer axis set with a dummy placeholder when a compound slicer is present</span>" but it sounds like the right thing. If it tends to work well with both native SQL and in-memory evaluation then it is undoubtedly the right solution.</div><div><br></div><div>FWIW, I have a real problem with "List&lt;Member&gt; slicerMembers" in RolapEvaluator. This implies that the slicer is flat (i.e. at most one member per hierarchy) which it most definitely isn't. Any code that relies on that member is probably suspect.</div><div><br></div><div>Julian</div></div></div><div><br></div></div></div></body></html>