[Mondrian] CurrentDateMember udf

Julian Hyde julianhyde at speakeasy.net
Tue Aug 28 20:55:00 EDT 2007


 

> The caching I was thinking of adding does use the dependency 
> interface 
> to declare that CurrentDateMember/CurrentDateString UDFs are not 
> dependent on any dimension value.

I don't think 'interface UserDefinedFunction' has a method for declaring
dependencies. Nor should it have, because dependencies are difficult to mere
mortals to understand.

> 
> I will add the timestamp to RolapResult because it will make any 
> computation requiring the current time consistent. However, 
> itself alone 
> will not help with the time consuming part of the UDF, i.e. issuing a 
> SQL to look up whether the member value corresponding the (cached) 
> timestamp string exists. Expression caching will still be a good 
> addition here.

If CurrentDateMember cannot declare its dependencies - and it can't because
it's a UDF - expression caching will be ineffective. You should either cache
within the function, or add this new Cache() function which knows to ignore
dependencies and force caching.

Julian




More information about the Mondrian mailing list