When sorting UID by val(varName), there are 3 results.
- If all UIDs contain varName, UIDs will be sorted as expected.
- If some UIDs don’t contain varName, they will be ignored and not responded, while others which contain varName are still sorted as expected.
- If all UIDs don’t contain varName, all of them are still responded but in disorder.
Take an example.
{
directors as var(func: allofterms(name@en, "Quentin Tarantino")) {
director.film (orderdesc:initial_release_date, first:1){
latestFilm as name@en
}
minLatestFilm as max(val(latestFilm))
}
byLatestFilm(func: uid(directors), orderasc: val(minLatestFilm)) {
name@en
latestFilm: val(minLatestFilm)
}
}
As mentioned above, the followings are 3 cases.
- All directors contain minLatestFilm and are sorted as expected
- Some directors which don’t contain minLatestFilm aren’t not appeared in the result, while others are sorted.
- All directors don’t contain minLatestFilm, but are still responded in disorder.
I think that the 2nd and 3rd items conflict.
Because when I expect the UIDs without minLatestFilm will be ignored in response according to 2nd item, however, they will show up in the 3rd cases.
I would highly appreciate your explanation on the design concept.
Thank you