[Mondrian] Modify SqlTupleReader.readTuples() to use aggregrate tables

Robin Tharappel rtharappel at gmail.com
Wed Nov 14 13:08:58 EST 2007


Hello,

Attached are some changes (based on 2.4.2) which allow Mondrian to use
the aggregate tables when obtain members through
SqlTupleReader.readTuples(). This change is more substantial than the
change required to get SqlMemberSource.getMemberChildern() to use
aggregate tables. This is primarily because
SqlTupleReader.readTuples() can return members for different
dimensions at more than one level. In addition it requires support for
native filter constraint (RolapNativeFilter) and top count order by
(RolapNativeTopCount).

The change primarily involves modifying the constraint classes
(MemberChildrenConstraint, TupleConstraint, etc) to take in AggStar
and Evaluator to generate the conditions for the constraints using
aggregate tables. The process of identifying the aggregate table
needed to take into account the dimensions levels that need to be
requested in addition to the level at which any of the constraints are
specified.

Unfortunately this does not handle virtual cubes (it will still hit
the fact table to obtain the dimension member even though aggregate
tables exists for each of the cubes in the virtual cube). Also there
maybe an issue with regarding captions. If an aggregate table with
levels is used it may not have the caption columns specified. There
was some discussion about this issue in the past (below is the feature
request from sourceforge).

http://sourceforge.net/tracker/index.php?func=detail&aid=1579663&group_id=35302&atid=414616

The unit test provided a good way of verifying these changes (as they
caught several of my mistakes:)). I was hoping to get some feedback
regarding these changes. Let me know if you have any questions or
comments.

Thanks,

Robin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mondrian_agg_dim.zip
Type: application/zip
Size: 69933 bytes
Desc: not available
Url : http://lists.pentaho.org/pipermail/mondrian/attachments/20071114/7957d563/attachment.zip 


More information about the Mondrian mailing list