Dimension equality relation faulty in OLAP4j connector
Open Java API for OLAP
Brought to you by:
jhyde,
lucboudreau
Dimension dim1;
Dimension dim2;
dim1.equals(dim2) always return true, if both dimensions have identical names.
This also happens, when these dimensions actually have different members.
Example:
dim1 is private Measure dimension of cube X with members {Unit, Price}
dim2 is private Measure dimension of cube Y with members {Count, Salery}
Any idea how should this be handled?
I think .equals should compare cubes, so Cube1.Dim1 is not equal to Cube2.Dim1.
What if there are two connections to the same server, using different users, who can both see Cube1 but have different access to Dim1. Should connection1's Cube1.Dim1 be equal to connection2's Cube1.Dim1?
I'm not sure. I don't want to overdo this.
It looks as if, within an XMLA connection, a given XmlaOlap4jDimension is created once and only once. If that's really true, we could just use object identity.