[
https://issues.apache.org/jira/browse/CALCITE-969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Hyde resolved CALCITE-969.
---------------------------------
Resolution: Fixed
Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/80bbb5bf.
> Composite EnumerableSort with DESC wrongly sorts NULL values low
> ----------------------------------------------------------------
>
> Key: CALCITE-969
> URL: https://issues.apache.org/jira/browse/CALCITE-969
> Project: Calcite
> Issue Type: Bug
> Reporter: liyang
> Assignee: Julian Hyde
> Fix For: 1.6.0
>
>
> NULL first or NULL last is not clearly defined by sql spec, but should be
> consistent in calcite.
> I spot order by (A desc) returns NULL last, but order by (A desc, B) returns
> NULL first.
> E.g. "select cal_dt, country, ... from xxx order by COUNTRY DESC" returns
> 2013-08-11 US ....
> 2013-08-18 FR ....
> 2013-03-31 null ....
> 2013-11-10 null ....
> E.g. "select cal_dt, country, ... from xxx order by COUNTRY DESC, CAL_DT
> ASC" returns
> 2013-03-31 null ....
> 2013-11-10 null ....
> 2013-08-11 US ....
> 2013-08-18 FR ....
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)