How can we improve Azure Cosmos DB?

Order By Null Handling

Currently if you do an order by on a nullable value, the documents are not returned at all. Please add functionality similiar to Application Insights where you can specify if the documents with the null value appear at the beginning or end of the sort.

63 votes
Vote
Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)
You have left! (?) (thinking…)
Jack Bond shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

2 comments

Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)
Submitting...
  • Matthew Kowalski commented  ·   ·  Flag as inappropriate

    When using the ORDER BY clause, if a document does not contain the property which is being sorted on, that document will not be included in the result set.

    Would it be possible to treat 'undefined' the same as 'null' when returning results sets that use an ORDER BY clause?

Feedback and Knowledge Base