[Mondrian] non unique members of foodmart's [Customers] level

Julian Hyde jhyde at pentaho.com
Wed Apr 6 18:15:42 EDT 2011

The olap4j specification doesn't require that a driver always gives out the
same java object for a given OLAP object. If you want to check whether two
objects are 'the same', use the .equals() method. (Or use
.getUniqueName().equals() if you prefer.)
I believe that the driver generates wrapper objects. If you access the same
member at different times, you might get a different object every time. 
(Don't worry about performance. Given how efficient java gc is these days, I
reckon that it is cheaper to create a new wrapper each time than to maintain
a hashtable to ensure that we always give out the same object every time.
The table would have to be thread-safe, would require at least 4 pointers
per Map.Entry, et cetera. When writing the driver, we made sure that wrapper
objects are immutable, very cheap to construct and contain very little



From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On
Behalf Of Michele Rossi
Sent: Wednesday, April 06, 2011 5:57 AM
To: Mondrian developer mailing list
Subject: [Mondrian] non unique members of foodmart's [Customers] level

I am using the foodmart database with the latest mondrian to test some of my
code and I've run into something puzzling.

It looks like in Cube "Sales Ragged" we find several members of level
[Customers].[Name] appearing more than once.

One of those members has unique name

What I found is also that the duplicate objects (instances of
MondrianOlap4jMember) are distinct java objects but delegate internally to
the same mondrian.olap.Member instance.

Am I going crazy or am I missing something pretty obvious again?



Michele Rossi

Via San Martino, 52, 56125 Pisa, ITALY
T: +39 050 220 3894
 <mailto:m.rossi at iontrading.com> m.rossi at iontrading.com
 <http://www.iontrading.com/> http://www.iontrading.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20110406/b821823b/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 1461 bytes
Desc: not available
Url : http://lists.pentaho.org/pipermail/mondrian/attachments/20110406/b821823b/attachment.jpe 

More information about the Mondrian mailing list