<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt;">We’re
looking at an enhancement to native evaluation with virtual cubes and are
looking for feedback.</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt;">Right
now native NON EMPTY evaluation with virtual cubes has a strict restriction:
all measures in the query need to be on cubes that join to each dimension in the
crossjoin (see SqlContextConstraint.isValidContext). So for example a query
against [Warehouse and Sales] crossjoining Time and Product would work fine,
since both dimensions are present on both base cubes. The native code will
create two SQL queries and UNION them
together—one to pull NON EMPTY members from the Sales fact table and one from
Warehouse.</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt;">For
cases where there is a mixture of joining and non-joining dimensions the native
code will abort. There is a comment in isValidContext that this is done to
avoid a querying for the Cartesian product with the non-joining dim. I think
this is unnecessary, however. For the non-joining measure/dimension
combination, <i><span style="font-style: italic;">all</span></i> intersections
will be empty. This means we can simply skip execution of the SQL to pull
members for non-joining dimension/fact table
combination.</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt;">Here’s
an example:</span></font></p><font face="Arial" size="2"><span style="font-size: 10pt;"></span></font>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt;"> select<br>{ measures.[unit sales], [Measures].[Units Shipped] } on 0,<br>NON EMPTY Crossjoin({ [Promotion Media].[All Media].[Bulk Mail]}, [Product].[Product Category].members) on 1<br>
from [warehouse and sales]<br>where<br>[Time].[1997].[Q3].[9]<br></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt;">In this
query Promotion Media and Product both apply to [units sales]. Only Product
applies to [Units Shipped], however. Because of this, the results of this query
should be all NON EMPTY members that have [unit sales] data. For native
evaluation we can execute a SQL query joining the two dimensions to Sales, and
that alone should give the NON EMPTY tuples.</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt;">We’ve
made the change locally and tests are passing.</span></font></p>