[Mondrian] [Measures] dimension is equals any other [Measures] dimension.
Alexander Korsukov
akorsukov at gmail.com
Fri Jun 19 03:08:25 EDT 2009
Hello.
Right now, [Measures] dimension of one RolapCube is equals [Measures]
dimension of any another RolapCube, because RolapDimension and
DimensionBase does not override equals() method, and the base class
(OlapElementBase) compares only a name.
My fix: add method to RolapDiemnsion (or probably to DimensionBase)
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof RolapDimension) || isMeasures() ||
((RolapDimension)o).isMeasures()) {
return false;
}
return equals(o);
}
Future more, if I have cube [A] with dimension [D] and cube [B] with
dimension [D] and try to check equality I will see following
RolapCubeDimension dimDofA = ...;
RolapCubeDimension dimDofB = ...;
// call boolean mondrian.olap.OlapElementBase.equals(OlapElement mdxElement)
dimDofA.equals(dimDofB) // result is true
// call boolean mondrian.rolap.RolapCubeDimension.equals(Object o)
dimDofA.equals((Object)dimDofB) // result is false
This is bug or feature by design?
--
Best regards,
Alexander Korsukov
_____________________________________________________
mailto:akorsukov at gmail.com icq:8572488
(2E0A2052) xmpp:shko at jabber.ru
More information about the Mondrian
mailing list