[Mondrian] CurrentDateMember udf
Rushan Chen
rchen at lucidera.com
Tue Aug 28 21:14:50 EDT 2007
If expanding the UDF interface to use Mondrian exp cache is not
recommended, I will try to cache this locally(inside the UDF), so that
the user of this UDF does not have to worry about caching.
Rushan
Julian Hyde wrote:
>
>
>
>> 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
>
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
More information about the Mondrian
mailing list