[Mondrian] CustomizedParserTest and writeback

Rushan Chen rushan.chen at gmail.com
Thu Jun 11 20:12:18 EDT 2009


Julian,

Thanks for the headsup.

CustomizedParser is used by us to limit the types of user generated MDX. 
The generated MDX is first parsed and then Query.resolve() is called 
once to validate the all the expressions contained.

Not sure I understand how you change can cause the failure in that test. 
However, if you can add an API to make the test pass then my side of the 
code should be similar to adapt. At the moment we're  using an older 
mondrian.jar so the new API can be called when we upgrade.

Rushan

Julian Hyde wrote:
> Rushan,
>  
> I am about to check in (in the next couple of days) an experimental 
> implementation of cell writeback. As part of this change, I had to 
> change the behavior of the validator slightly, and it broke 
> CustomizedParserTest until I extended the validator API to allow  you 
> to ask for the old behavior.  I presume you have a custom parser 
> (since you went to the effort of creating CustomizedParserTest) so you 
> may need to change this customized parser also.
>  
> Previously a validator would resolve a function to a function 
> definition (resolving among overloaded forms based on arg types, for 
> instance) every time it passed over the tree. Now the default behavior 
> is to resolve it the first time (when an UnresolvedFunCall becomes a 
> ResolvedFunCall) but to use the existing FunDef when validating a 
> ResolvedFunCall.
>  
> I added a method 'boolean Validator.alwaysResolveFunDef()', which is 
> false by default, but I provide a factory method so that 
> CustomizedParserTest can have it return true. Your custom parser 
> should probably do the same.
>  
> Julian
> ------------------------------------------------------------------------
>
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>   





More information about the Mondrian mailing list