[Mondrian] Proposal for adding result post processorextension tospi
julianhyde at speakeasy.net
Sun Oct 14 21:24:58 EDT 2007
It's a shame you need to use reflection to find out the members surrounding
a cell. It seems like there is not enough information in the Cell interface
to deduce the members, so that's something we should fix, because other
applications would need the same thing. Suppose I add a new method
'List<Integer> Cell.getOrdinateList()' - then you could use each coordinate
to get the corresponding axis position, hence its members. Would that be
sufficient for your purposes?
But the other extensions all sound natural and reasonable. Adding layers of
wrapper classes is common on modern software engineering. It can be a little
convoluted, but the value is that the underlying system (in this case
mondrian) is not customized for each application. Instead, you are using the
wrappers to create a read-only view which presents the data the way the
application needs it.
I hope you can see why I making 'RolapResult axes' non-final is a
significant change - it's another moving part, and another potential pitfall
to add a bug to mondrian.
From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On
Behalf Of Ajit Vasudeo Joglekar
Sent: Wednesday, October 10, 2007 11:53 PM
To: Mondrian developer mailing list
Subject: RE: [Mondrian] Proposal for adding result post processorextension
We are using XMLA in the deployment scenario. This is what we have done to
post process the rolap result in xmla pipeline
- Extend XmlaServlet
Override "protected XmlaHandler getXmlaHandler()" to return our own
- Extend XmlaHandler
Override "protected Connection getConnection(final
DataSourcesConfig.Catalog catalog, final Role role, final String roleName)
throws XmlaException" to return our own RolapConnection
- Implement Connection, delegate to RolapConnection
Wrap "public Result execute(Query query)" to return our own Result.
Delegate all other method calls to RolapConnection.
- Extend ResultBase to do the Result post processing as required. Use in the
Connection execute method
- Define the classes that need to access RolapCell (package visibility) in
- Use reflection to invoke getMembers on RolapCell. Required to determine
whether the cell value is a result of literal calculated member evaluation
This takes care of the post processing the result in Xmla pipeline. We also
use Mdx servlet in our development setup for simplifying the development
cycle. We will need to handle the post processing separately for this
In the post I mentioned about removing final
protected final Axis axes; // remove final
This is not required
It doesn't feel very clean the way we have made changes from the end of the
xmla processing pipeline, added the new classes in mondrian.rolap package
and used reflection in one case. It will be much simpler and cleaner if we
could intercept the result and change visibility, accessibility of few
things. Hence the proposal.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mondrian