<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19019"></HEAD>
<BODY>
<DIV><SPAN class=929060622-06042011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN class=929060622-06042011><FONT color=#000080 size=2
face="Lucida Sans">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.)</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=929060622-06042011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN
class=929060622-06042011></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=929060622-06042011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN class=929060622-06042011></SPAN>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. </FONT></SPAN></DIV>
<DIV><SPAN class=929060622-06042011><FONT color=#000080 size=2
face="Lucida Sans"></FONT></SPAN> </DIV>
<DIV><SPAN class=929060622-06042011><FONT color=#000080 size=2
face="Lucida Sans">(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.)</FONT></SPAN></DIV>
<DIV><SPAN class=929060622-06042011><FONT color=#000080 size=2
face="Lucida Sans"></FONT></SPAN> </DIV>
<DIV><SPAN class=929060622-06042011></SPAN><FONT face="Lucida Sans"><FONT
color=#000080><FONT size=2>Julian</FONT></FONT></FONT></DIV>
<DIV><FONT face="Lucida Sans"><FONT color=#000080><FONT size=2><SPAN
class=929060622-06042011></SPAN></FONT></FONT></FONT><BR> </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000080 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> mondrian-bounces@pentaho.org
[mailto:mondrian-bounces@pentaho.org] <B>On Behalf Of </B>Michele
Rossi<BR><B>Sent:</B> Wednesday, April 06, 2011 5:57 AM<BR><B>To:</B> Mondrian
developer mailing list<BR><B>Subject:</B> [Mondrian] non unique members of
foodmart's [Customers] level<BR></FONT><BR></DIV>
<DIV></DIV>Hi,
<DIV>I am using the foodmart database with the latest mondrian to test some of
my code and I've run into something puzzling.</DIV>
<DIV><BR></DIV>
<DIV>It looks like in Cube "Sales Ragged" we find several members of
level [Customers].[Name] appearing more than once.</DIV>
<DIV><BR></DIV>
<DIV>One of those members has unique name
[Customers].[Canada].[BC].[Burnaby].[Cindy]</DIV>
<DIV><BR></DIV>
<DIV>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.</DIV>
<DIV><BR></DIV>
<DIV>Am I going crazy or am I missing something pretty obvious again?</DIV>
<DIV><BR></DIV>
<DIV>thanks,</DIV>
<DIV>Michele<BR clear=all><BR>-- <BR><SPAN
style="BORDER-COLLAPSE: collapse; FONT-FAMILY: arial, sans-serif; FONT-SIZE: 13px">
<P style="MARGIN: 0px 0px 12pt"><B><SPAN
style="COLOR: navy; FONT-SIZE: 8pt"><BR></SPAN></B></P>
<P style="MARGIN: 0px 0px 12pt"><B><SPAN
style="COLOR: navy; FONT-SIZE: 8pt">Michele Rossi</SPAN></B><SPAN
style="COLOR: rgb(31,73,125); FONT-SIZE: 8pt"><BR><BR></SPAN><SPAN
style="COLOR: rgb(31,73,125); FONT-SIZE: 8pt"><IMG
src="cid:929060622@06042011-165E"></SPAN><SPAN
style="COLOR: rgb(31,73,125); FONT-SIZE: 8pt"></SPAN></P>
<P style="MARGIN: 0px 0px 12pt"><SPAN
style="COLOR: rgb(31,73,125); FONT-SIZE: 8pt">Via San Martino, 52, 56125 Pisa,
ITALY<BR>T: +39 050 220 3894<BR><A style="COLOR: rgb(42,93,176)"
href="mailto:m.rossi@iontrading.com" target=_blank><SPAN
style="COLOR: blue">m.rossi@iontrading.com</SPAN></A><BR><A
style="COLOR: rgb(42,93,176)" href="http://www.iontrading.com/"
target=_blank><SPAN
style="COLOR: blue">http://www.iontrading.com</SPAN></A></SPAN></P></SPAN><BR></DIV></BLOCKQUOTE></BODY></HTML>