Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

has function with pagination (first) does not return correct count #4282

Closed
danielmai opened this issue Nov 16, 2019 · 0 comments · Fixed by #4331
Closed

has function with pagination (first) does not return correct count #4282

danielmai opened this issue Nov 16, 2019 · 0 comments · Fixed by #4331
Labels
area/querylang/pagination Related to pagination: first, offset, etc area/querylang Issues related to the query language specification and implementation. kind/bug Something is broken. priority/P1 Serious issue that requires eventual attention (can wait a bit)

Comments

@danielmai
Copy link
Contributor

What version of Dgraph are you using?

master (0259f3d)

I suspect this bug got introduced in #3970.

Have you tried reproducing the issue with the latest release?

does not happen in v1.1.0.

What is the hardware spec (RAM, OS)?

Ubuntu Linux 64 GB

Steps to reproduce the issue (command/config used to run Dgraph).

  1. Run Dgraph cluster with latest master
  2. Load 21-million movie data set
  3. Run a query with has() with first limit for a language string predicate name@en:
{
  q(func: has(name@en), first: 10) {
    count(uid)
  }
}

The query response returns {"count": 7}. If I set first: 100, I get {"count": 96}.

Expected behaviour and actual result.

Since there are >100 name@en edges, I expected the paginated result with first: 10 to return 10 nodes and first: 100 to return 100 nodes.

@danielmai danielmai added kind/bug Something is broken. area/querylang Issues related to the query language specification and implementation. area/querylang/pagination Related to pagination: first, offset, etc priority/P1 Serious issue that requires eventual attention (can wait a bit) labels Nov 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/querylang/pagination Related to pagination: first, offset, etc area/querylang Issues related to the query language specification and implementation. kind/bug Something is broken. priority/P1 Serious issue that requires eventual attention (can wait a bit)
Development

Successfully merging a pull request may close this issue.

1 participant