<br>Database drivers who implement their own parser and grammar are free to not use the one provided by olap4j. An OlapConnection still has to provide a parser factory to public code. Nothing should change there. Yet this does not constitute an argument for not exposing the internal parser. Olap4j contains the only MDX parser available as far as I know and it
would be a shame to bury it at the bottom of the library.<br><br>
I agree with keeping DefaultMdxParserImpl part of the SPI only. There is no
need to expose it and as I said in my previous email, I'd much rather
see a unified standard way of obtaining a MdxParser implementation. I'm not talking about core API changes. Here's a very common and realistic use case for it; a syntax-aware GUI editor for MDX queries which is not a query tool.<br>
<br>If your objection is related to the separation of intent of the different components of olap4j, then I can assure you that I am fully aware of the mixup that is already in place. Olap4j includes already an four distinctive components bundled together... We talked about separating those in the past and never got to doing it. Should we decide to do the actual work, I believe that the natural separation of components should be as follows.<br>
<ul><li>API (org.olap4j.* pagkages, minus the ones below)<br>This is the bulk of the olap4j code.<br><br></li><li>XML/A Generic Driver (org.olap4j.driver.xmla.*)<br>The XML/A driver depends on the API only.<br><br></li><li>
Query Model (org.olap4j.query.*)<br>The query model classes would depend on the API only.<br><br></li><li>MDX Parser (some package that is non existent yet)<br>The MDX parser would be a very simplistic wrapper over the default parser SPI classes and exposed as a MdxParser factory. It would depend on the API core only.<br>
</li></ul>Each of those components can be part of the olap4j source tree for now, but I'd like to take the opportunity to initiate a discussion about their separation and get feedback about the ramifications. I don't mind doing the actual work.<br>
<br clear="all">_____________________________<br>Luc Boudreau<br>
<br><br><div class="gmail_quote">On Tue, Apr 6, 2010 at 7:49 PM, Julian Hyde <span dir="ltr"><<a href="mailto:jhyde@pentaho.com">jhyde@pentaho.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
<div><span><font color="#000080" face="Lucida Sans" size="2">I stand by the comments I made in that forum post. MdxParser
is part of olap4j's public API, but DefaultMdxParserImpl is not and will never
be.</font></span></div>
<div><span><font color="#000080" face="Lucida Sans" size="2"></font></span> </div>
<div><span><a href="http://www.olap4j.org/api/org/olap4j/mdx/parser/package-summary.html" target="_blank">http://www.olap4j.org/api/org/olap4j/mdx/parser/package-summary.html</a></span></div>
<div><span><font color="#000080" face="Lucida Sans" size="2"></font></span> </div>
<div><span><font color="#000080" face="Lucida Sans" size="2">The public API, remember, is for people building OLAP
applications. To them, olap4j needs to look like JDBC, but with one exception.
JDBC drivers don't supply a SQL parser, but parsing is more important to MDX
applications so every olap4j driver must supply an MDX parser that implements
the MdxParser interface.</font></span></div>
<div><span><font color="#000080" face="Lucida Sans" size="2"></font></span> </div>
<div><span><font color="#000080" face="Lucida Sans" size="2">The other important audience is developers of drivers. To a
limited extent, the olap4j code base gives them an SPI to help them build
drivers. <span><font color="#000080" face="Lucida Sans" size="2">DefaultMdxParserImpl is part of that SPI, as are the classes
in org.olap4j.impl. We will try to keep the SPI stable as olap4j eveolves but we
won't bust a gut over it.</font></span></font></span></div>
<div><span><font color="#000080" face="Lucida Sans" size="2"><span></span></font></span> </div>
<div><span><font color="#000080" face="Lucida Sans" size="2"><span>Remember that different
drivers might be talking to different OLAP engines, and different engines have
different dialects of MDX, so naturally the driver writers might want to create
their own parser. They can write a parser from scratch, or they can start with
the default MDX parser.</span></font></span></div>
<div><span><font color="#000080" face="Lucida Sans" size="2"><span></span></font></span> </div>
<div><span><font color="#000080" face="Lucida Sans" size="2"><span>
<div><span><font color="#000080" face="Lucida Sans" size="2">If you want to dismember the olap4j project to get the MDX
parser, then go ahead. olap4j is after all an open source project. But you're on
your own. You are in a small minority of olap4j users, and we don't intend to
change the olap4j API for your benefit.</font></span></div>
<div><span></span> </div>
<div><span>It sounds like </span></div>
<div><span></span> </div>
<div><span>Julian</span></div>
<div><span><font color="#000080" face="Lucida Sans" size="2"></font></span> </div></span></font></span></div><br>
<blockquote style="border-left: 2px solid rgb(0, 0, 128); padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><b>From:</b> Luc Boudreau
[mailto:<a href="mailto:lucboudreau@gmail.com" target="_blank">lucboudreau@gmail.com</a>] <br><b>Sent:</b> Tuesday, April 06, 2010 3:58
PM<br><b>To:</b> Mondrian developer mailing list<br><b>Cc:</b>
<a href="mailto:olap4j-devel@lists.sourceforge.net" target="_blank">olap4j-devel@lists.sourceforge.net</a><br><b>Subject:</b> Re: [Olap4j-devel]
[Mondrian] Convert Connection to OlapConnection<br></font><br></div><div><div></div><div class="h5">
<div></div><br>As of olap4j revision 307 ( <a href="http://olap4j.svn.sourceforge.net/viewvc/olap4j?view=rev&revision=307" target="_blank">http://olap4j.svn.sourceforge.net/viewvc/olap4j?view=rev&revision=307</a>
) the default MDX parser does not depend on OlapConnection. It should not have
been dependent on it in the first place. <br><br>Mondrian developers: please
modify the olap4j connection implementation and remove the now deprecated call
to DefaultMdxParserImpl(OlapConnection). Modifications to the generic XML/A
driver have already been performed.<br><br>This does not mean that
DefaultMdxParserImpl is part of the public API yet. There should be a default
parser factory exposed to developers. In the meanwhile, developers can
directly instantiate it, but be advised that we do not provide any guarantees
on this object's signature and we reserve the right to modify it in the
future. To create a parser, developers can call the empty
constructor.<br><br>A compiled binary which includes those changes can be
picked from the CI server as of now :<br><br><a href="http://ci.pentaho.com/view/Analysis/job/olap4j/258/" target="_blank">http://ci.pentaho.com/view/Analysis/job/olap4j/258/</a><br><br clear="all">_____________________________<br>
Luc Boudreau<br><br><br>
<div class="gmail_quote">On Tue, Apr 6, 2010 at 5:38 PM, Luc Boudreau <span dir="ltr"><<a href="mailto:lucboudreau@gmail.com" target="_blank">lucboudreau@gmail.com</a>></span>
wrote:<br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"><br>This topic was discussed in olap4j forums.<br><br><a href="http://sourceforge.net/projects/olap4j/forums/forum/577988/topic/3545015" target="_blank">http://sourceforge.net/projects/olap4j/forums/forum/577988/topic/3545015</a><br>
<br>Although
Julian's last comment mentioned that the parser is not officially part of
the public API, I for one would like to make it part of the public API.
There are many use cases for it and your request confirms it.<br><br>I'll
see what I can do to detach the parser from the connection classes.<br><br clear="all">_____________________________<br>Luc Boudreau<br><br><br>
<div class="gmail_quote">
<div>
<div></div>
<div>On Tue, Apr 6, 2010 at 5:32 PM, Josh Chappelle <span dir="ltr"><<a href="mailto:jchappelle@4redi.com" target="_blank">jchappelle@4redi.com</a>></span> wrote:<br></div></div>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
<div>
<div></div>
<div>
<div vlink="purple" link="blue" lang="EN-US">
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-family: Arial; font-size: 10pt;">Hi,</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-family: Arial; font-size: 10pt;"></span></font> </p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-family: Arial; font-size: 10pt;">We have a need to use the
MdxParser component from the Olap4j project. However up until this point
we have not been using olap4j at all. To instantiate a
DefaultMdxParserImpl you have to provide an org.olap4j.OlapConnection
object in the constructor. Our software is using a
mondrian.olap.Connection. Is there a way to convert between these two
connection objects? If not does it mean that we will have to use the
org.olap4j.OlapConnection in order to use the MdxParser?</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-family: Arial; font-size: 10pt;"></span></font> </p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-family: Arial; font-size: 10pt;">Thanks,</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-family: Arial; font-size: 10pt;"></span></font> </p><font color="#888888">
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-family: Arial; font-size: 10pt;">Josh
</span></font></p></font></div></div><br></div></div>_______________________________________________<br>Mondrian
mailing list<br><a href="mailto:Mondrian@pentaho.org" target="_blank">Mondrian@pentaho.org</a><br><a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br>
<br></blockquote></div><br></blockquote></div><br></div></div></blockquote></div>
</blockquote></div><br>