Cosmos: Distinct operator in queries
smitpatel opened this issue · 4 comments
smitpatel commented
Test: Distinct
System.ArgumentException : Distict query requires a matching order by in order to return a continuation token.
If you would like to serve this query through continuation tokens, then please rewrite the query in the form 'SELECT DISTINCT VALUE c.blah FROM c ORDER BY c.blah' and please make sure that there is a range index on 'c.blah'.
ajcvickers commented
To test on Cosmos.
ajcvickers commented
@divega to look into order-by lifting.
maumar commented
Basic Distinct scenarios work now. Many are blocked due to lack of subqueries, meaning we can't do pushdown (e.g. customers.Distinct().OrderBy()) or customers.Distinct().Count()