Open lloydtabb opened 2 years ago
A quick survey of various languages:
By default: nulls first when ascending, nulls last when descending:
By default: nulls last when ascending, nulls first when descending:
Three of the four let you throw in a NULLS FIRST
or NULLS LAST
, though MySQL has this weird minus syntax.
In general I agree with the sentiment that nulls are the least important generally and could always be last, but it's weird to diverge from seemingly every language that by default orders them to the top in one of its sort orders.
If the column is high cardinality, it's possible you'd never notice the nulls at all if you have a record limit.
Malloy should have an attitude about NULL and sorting. I'm thinking NULLS LAST is what we generally want. You can always COALESE to a low value if you want to sort them first.
Discussion?