Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Severe
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
These test cases demonstrate a problem with calculated
member name lookup originally posted to the
mondrian-devel list on Aug 6, 2004. I'm planning to
push these tests and a fix for it as described in the mail.
public void
testMultipleCalculatedMembersWhichAreNotMeasures() {
String query = "WITH" + nl +
" MEMBER [Store].[x] AS '1'" + nl +
" MEMBER [Product].[x] AS '1'" + nl +
"SELECT {[Store].[x]} ON COLUMNS" + nl +
"FROM Sales";
String desiredResult = "Axis #0:" + nl +
"{}" + nl +
"Axis #1:" + nl +
"{[Store].[x]}" + nl +
"Row #0: 1" + nl;
runQueryCheckResult(query, desiredResult);
}
/**
* There used to be something wrong with non-measure
calculated members
* where the ordering of the WITH MEMBER would
determine whether or not
* the member would be found in the cube. This test
would fail but the
* previous one would work ok.
*/
public void
testMultipleCalculatedMembersWhichAreNotMeasures2() {
String query = "WITH" + nl +
" MEMBER [Product].[x] AS '1'" + nl +
" MEMBER [Store].[x] AS '1'" + nl +
"SELECT {[Store].[x]} ON COLUMNS" + nl +
"FROM Sales";
String desiredResult = "Axis #0:" + nl +
"{}" + nl +
"Axis #1:" + nl +
"{[Store].[x]}" + nl +
"Row #0: 1" + nl;
runQueryCheckResult(query, desiredResult);
}
/*
* This one had the same problem. It wouldn't find the
* [Store].[All Stores].[x] member because it has the
same leaf
* name as [Product].[All Products].[x].
*/
public void
testMultipleCalculatedMembersWhichAreNotMeasures3() {
String query = "WITH" + nl +
" MEMBER [Product].[All Products].[x] AS '1'" + nl +
" MEMBER [Store].[All Stores].[x] AS '1'" + nl +
"SELECT {[Store].[All Stores].[x]} ON COLUMNS" + nl +
"FROM Sales";
String desiredResult = "Axis #0:" + nl +
"{}" + nl +
"Axis #1:" + nl +
"{[Store].[All Stores].[x]}" + nl +
"Row #0: 1" + nl;
runQueryCheckResult(query, desiredResult);
}
member name lookup originally posted to the
mondrian-devel list on Aug 6, 2004. I'm planning to
push these tests and a fix for it as described in the mail.
public void
testMultipleCalculatedMembersWhichAreNotMeasures() {
String query = "WITH" + nl +
" MEMBER [Store].[x] AS '1'" + nl +
" MEMBER [Product].[x] AS '1'" + nl +
"SELECT {[Store].[x]} ON COLUMNS" + nl +
"FROM Sales";
String desiredResult = "Axis #0:" + nl +
"{}" + nl +
"Axis #1:" + nl +
"{[Store].[x]}" + nl +
"Row #0: 1" + nl;
runQueryCheckResult(query, desiredResult);
}
/**
* There used to be something wrong with non-measure
calculated members
* where the ordering of the WITH MEMBER would
determine whether or not
* the member would be found in the cube. This test
would fail but the
* previous one would work ok.
*/
public void
testMultipleCalculatedMembersWhichAreNotMeasures2() {
String query = "WITH" + nl +
" MEMBER [Product].[x] AS '1'" + nl +
" MEMBER [Store].[x] AS '1'" + nl +
"SELECT {[Store].[x]} ON COLUMNS" + nl +
"FROM Sales";
String desiredResult = "Axis #0:" + nl +
"{}" + nl +
"Axis #1:" + nl +
"{[Store].[x]}" + nl +
"Row #0: 1" + nl;
runQueryCheckResult(query, desiredResult);
}
/*
* This one had the same problem. It wouldn't find the
* [Store].[All Stores].[x] member because it has the
same leaf
* name as [Product].[All Products].[x].
*/
public void
testMultipleCalculatedMembersWhichAreNotMeasures3() {
String query = "WITH" + nl +
" MEMBER [Product].[All Products].[x] AS '1'" + nl +
" MEMBER [Store].[All Stores].[x] AS '1'" + nl +
"SELECT {[Store].[All Stores].[x]} ON COLUMNS" + nl +
"FROM Sales";
String desiredResult = "Axis #0:" + nl +
"{}" + nl +
"Axis #1:" + nl +
"{[Store].[All Stores].[x]}" + nl +
"Row #0: 1" + nl;
runQueryCheckResult(query, desiredResult);
}
{eburnette}, 12/13/2004: resolution_id, 100 |
{eburnette}, 12/13/2004: close_date, 0