I have logged https://issues.apache.org/jira/browse/CALCITE-981 to track this.
> On Nov 18, 2015, at 10:28 AM, Julian Hyde <[email protected]> wrote: > > >> On Nov 16, 2015, at 6:12 PM, Jinfeng Ni <[email protected]> wrote: >> >> The only concern I have is about JDBC data source that Drill is >> pushing to. If we get the sort order fully specified in planning >> time, then the same query might see different results when it goes >> through the native engine (which uses a different sort order), or it >> goes through Drill. > > Agreed. Some work on the JDBC adapter will be needed. If the JDBC source > supports the desired null direction (e.g. has NULLS FIRST/LAST syntax) we > should generate it. If the column is NOT NULL, it’s not a problem. With > Mondrian we ended up generating "ORDER BY ISNULL(x), x” on MySQL[1]. > > Julian > > [1] http://jira.pentaho.com/browse/MONDRIAN-226 >
