[Mondrian] ClassCastException w/ null members

Luc Boudreau lucboudreau at gmail.com
Wed Sep 18 14:39:05 EDT 2013


On Wed, Sep 18, 2013 at 2:24 PM, Julian Hyde <jhyde at pentaho.com> wrote:

> To focus the mind: imagine that a level is based on a boolean column and
> has two members with keys false and true, plus a calc member.


I like your example.

This is a problem we've had in the codebase for a long while. We've tried
to use Java's sorting APIs by implementing comparators that would resent
resorting to 'instanceof' checks, but this always somehow turns out out to
fail for this reason and that.

Besides, all of Java's compareTo implementations do hard casting. This is a
major problem for us.

I don't think that we'll resolve this problem with trivial java constructs.
We'll need to figure out how to:

 - support asymmetric keys (The key of a calculated member won't have the
same attribute dimensionality as the regular members)
 - support hierarchal key comparison (There are two types of sort in OLAP
after all)

If we could solve these two issues in one swoop with a neat custom data
structure, that would be most awesome.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20130918/7535f4cc/attachment.html 


More information about the Mondrian mailing list