<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Luc, thanks.<br>I've tried building my own extension of JdbcDialectImpl and placed the jar in the lib directory of the mondrian webapp.<br>My class actually only implements this method:<br><br>@Override<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public String generateOrderByNulls(<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String expr,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boolean ascending,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boolean collateNullsLast)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; LOGGER.info("Generating Order By expression");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return generateOrderByNullsAnsi(expr, ascending, collateNullsLast);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br><br>But still no luck. The 'Dialect' property in the connection string seems to be ignored. <br>I wonder if I'm using the right version of the code (I'm on 3.6.1).<br><br>Any ideas?<br><br>Regards,<br><br>JB.<br><br><div><hr id="stopSpelling">From: lucboudreau@gmail.com<br>Date: Thu, 10 Apr 2014 15:41:39 -0400<br>To: mondrian@pentaho.org<br>Subject: Re: [Mondrian] Forcing "expr direction NULLS LAST" in order by without rebuild?<br><br><div dir="ltr">The Oracle dialect has checks in place to validate that it talks to an Oracle DB, so it might fallback to JdbcDialectImpl. If you turn on debugging output in log4j, you'll see which dialect is chosen.<div>

<br></div><div>Try creating your own class and then pass it with the Dialect property, making sure it is present in your classpath. I think that should work.</div><div><br></div><div>Luc</div></div><div class="ecxgmail_extra">

<br><br><div class="ecxgmail_quote">On Wed, Apr 9, 2014 at 1:11 PM, Jesús Barrasa <span dir="ltr">&lt;<a href="mailto:jbarrasa@outlook.com" target="_blank">jbarrasa@outlook.com</a>&gt;</span> wrote:<br><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;">




<div><div dir="ltr">Thanks! That sounds great but I cannot make it work :(<br>Is this on 3.6.1 ?<br>I've been trying to set the dialect to the Oracle one as it seems to use the group by notation that I need.<br>That's what my connection string looks like:<br>

<br>Provider=mondrian;Jdbc=jdbc:&lt;mydb&gt;;JdbcUser=&lt;myuser&gt;;JdbcPassword=&lt;pwd&gt;;Dialect=mondrian.spi.impl.OracleDialect;JdbcDrivers=&lt;mydriver&gt;;Catalog=/WEB-INF/queries/mycat.xml<br><br>But I see no difference, still generating the default SQL with the CASE expressions in the ORDER BY.<br>

Am I missing something?<br><br>Regards,<br><br>JB.<br><br><br><br><div>&gt; From: <a href="mailto:julianhyde@gmail.com" target="_blank">julianhyde@gmail.com</a><br>&gt; Date: Tue, 8 Apr 2014 18:12:24 -0700<br>&gt; To: <a href="mailto:mondrian@pentaho.org" target="_blank">mondrian@pentaho.org</a><br>

&gt; Subject: Re: [Mondrian] Forcing "expr direction NULLS LAST" in order by        without rebuild?<div><div class="h5"><br>&gt; <br>&gt; You can pass Dialect=com.example.MyDialect as part of the connect string. Mondrian will ignore its usual process of deducing the dialect from the JDBC database name and use the class you provide. You don’t need to re-compile Mondrian.<br>

&gt; <br>&gt; In other words, dialects are pluggable.<br>&gt; <br>&gt; Julian<br>&gt; <br>&gt; _______________________________________________<br>&gt; Mondrian mailing list<br>&gt; <a href="mailto:Mondrian@pentaho.org" target="_blank">Mondrian@pentaho.org</a><br>

&gt; <a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br></div></div></div>                                               </div></div>
<br>_______________________________________________<br>
Mondrian mailing list<br>
<a href="mailto:Mondrian@pentaho.org">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></div>
<br>_______________________________________________
Mondrian mailing list
Mondrian@pentaho.org
http://lists.pentaho.org/mailman/listinfo/mondrian</div>                                               </div></body>
</html>