Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Cherry pick from #8077. Steps to reproduce: ``` make image-local cd contrib/local-test && make up make schema-dql make load-data-dql-rdf make query-dql curl: (52) Empty reply from server make: *** [query-dql] Error 52 <alpha will crash and restart> ``` with the following minimal schema / data / query (should be placed in contrib/local-test): schema.dql: ``` type Person { name age friend } name: string @Index(term) . age: int @Index(int) . friend: [uid] @count . ``` dql-data.rdf ``` { set { _:michael <name> "Michael" . _:michael <dgraph.type> "Person" . _:michael <age> "314" . _:michael <friend> _:alice . _:michael <friend> _:bob . _:michael <friend> _:charlie . _:alice <name> "Alice" . _:alice <dgraph.type> "Person" . _:alice <age> "1" . _:bob <name> "Bob" . _:bob <dgraph.type> "Person" . _:bob <age> "2" . _:charlie <name> "Charlie" . _:charlie <dgraph.type> "Person" . } } ``` query.dql ``` { michael_friends_first(func: allofterms(name, "Michael")) { name age friend (orderasc: age, offset: -1) { name age } } } ``` ### Remarks - The cherry-pick does resolve the above crash - This issue exists in main - Why do we allow negative offsets? If they are not useful, we should return an error when a user attempt to query using a negative offset. Co-authored-by: Daniel Mai <[email protected]>
- Loading branch information