#46 Complex selection context broken

open
nobody
None
5
2012-10-08
2010-11-09
Julian Hyde
No

=== Email from Paul Stoellberger ===

1)
I've just commited a new unit test that covers a bug in the Olap4jNodeConverter we found through extensive testing in PAT.

Basically it comes down to this:
productDimension.include(
Selection.Operator.MEMBER, "Product", "All Products");
productDimension.include(
Selection.Operator.CHILDREN, "Product", "All Products");
QueryDimension timeDimension = query.getDimension("Time");
Selection selection = timeDimension.include(
Selection.Operator.CHILDREN, "Time", "Year", "1997");
selection.addContext(
productDimension.createSelection(
"Product", "All Products"));

When I do this selection the Olap4jNodeConverter ignores the "Products"."All Products".Children Selection completely.
It ignores the first selection on the productDimension as well, it just seems like it doesn't because its part of the selectionContext of the timeDimension selection.

I wasn't completely sure what MDX I would expect but I assumed something similar to:

SELECT
{[Measures].[Store Sales]} ON COLUMNS,
Hierarchize(Union(CrossJoin({[Product].[All Products]}, [Time].[1997].Children), CrossJoin([Product].[All Products].Children, [Time].[1997].Children))) ON ROWS
FROM [Sales]

I hope you consider this as a bug as well and can suggest a fix for this, since I don't really know how to do it myself...

(The actual mdx is:
SELECT
{[Measures].[Store Sales]} ON COLUMNS,
CrossJoin({[Product].[All Products]}, [Time].[1997].Children) ON ROWS
FROM [Sales]

Which i consider to be wrong because the All products.Children disappear.

=== end ===

See constant in org.olap4j.impl.Bug, and disabled test OlapTest.testComplexSelectionContext.

Discussion


Log in to post a comment.