[Mondrian] Another 2.4->3.x porting question

Eric McDermid mcdermid at stonecreek.com
Fri Jun 26 14:39:16 EDT 2009

OK, this one seems a little more arcane.

One of the custom enhancements made to Mondrian in Marin's codeline  
was the addition of a cached order function which caches a handful of  
queries per fact table in an LRU cache to speed up pagination for  
large dataset queries.

This was done by creating CachedOrderFunDef as a derived class of  
mondrian.olap.fun.OrderFunDef and a new CachedCalc as a derived class  
of mondrian.rolap.AbstractListCalc.  Code attached.

Registration of all this was done by getting direct reference to the  
schema's function table, casting it to FunTableImpl, then calling  
FunTableImpl.define(resolver) and FunTableImpl.organizeFunctions().

I'm not sure that was exactly an approved technique, but it worked.   
What's unclear to me is whether there's a more appropriate way of  
doing it in 3.x that doesn't rely on breaking encapsulation and using  
non-public APIs.  The CustomizedFunctionTable that Rushan introduced a  
while back looks like it might be part of the solution, but I'm not  
really sure of its intended usage, and in any case that wouldn't get  
me past the calculator dependencies.

  -- Eric

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CachedOrderFunDef.java
Type: application/octet-stream
Size: 2598 bytes
Desc: not available
Url : http://lists.pentaho.org/pipermail/mondrian/attachments/20090626/0d4e4dd9/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CachedCalc.java
Type: application/octet-stream
Size: 2604 bytes
Desc: not available
Url : http://lists.pentaho.org/pipermail/mondrian/attachments/20090626/0d4e4dd9/attachment-0001.obj 

More information about the Mondrian mailing list