-
Enhancement
-
Resolution: Done
-
Major
-
4.0.0.Alpha2
-
None
The new query engine (MODE-2018) originally always returned nulls first, even with DESC and ASC ordering. This made it difficult to verify results in unit tests, so while fixing this it was also pretty easy to add support for "NULLS FIRST" or "NULLS LAST" on each of the ordering expressions. For example:
SELECT * FROM [car:Car] ORDER BY [car:msrp] DESC NULLS FIRST
The grammar would be modified to be:
orderings ::= Ordering {',' Ordering} Ordering ::= DynamicOperand [Order] [NullOrder] Order ::= 'ASC' | 'DESC' NullOrder ::= 'NULLS FIRST' | 'NULLS LAST'
If the null ordering is not specified then the handling of the null values is:
- NULLS LAST if the sort is ASC
- NULLS FIRST if the sort is DESC
- is incorporated by
-
MODE-2018 Query engine should work with no indexes and with defined indexes
- Resolved