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

Michele Rossi michele.rossi at gmail.com
Thu Apr 7 03:29:26 EDT 2011

hi Julian,
I think my explanation of the problem was a bit misleading.

The actual problem is that there are N objects on a level with the same
unique name.
In the case I quote below one has ordinal 10 and the other has ordinal 11.

Because I use the unique name as primary for my proprietary metadata
serialisation I only get the first one, the one with ordinal 10.
I can reproduce it reliably.

Shall I file a JIRA for this one too?


On 7 April 2011 00:15, Julian Hyde <jhyde at pentaho.com> wrote:

>  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 data.)
> Julian
>  ------------------------------
> *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
> Hi,
> 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
> [Customers].[Canada].[BC].[Burnaby].[Cindy]
> 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?
> thanks,
> Michele
> --
> *
> *
> *Michele Rossi*
> Via San Martino, 52, 56125 Pisa, ITALY
> T: +39 050 220 3894
> m.rossi at iontrading.com
> http://www.iontrading.com
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20110407/db128cf3/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/20110407/db128cf3/attachment.jpe 

More information about the Mondrian mailing list