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

Invalid error for semantically correct query #2610

Closed
armaneous opened this issue Sep 24, 2018 · 1 comment
Closed

Invalid error for semantically correct query #2610

armaneous opened this issue Sep 24, 2018 · 1 comment
Assignees
Labels
kind/bug Something is broken.

Comments

@armaneous
Copy link

armaneous commented Sep 24, 2018

  • What version of Dgraph are you using?
    dgraph:latest

  • Have you tried reproducing the issue with latest release?
    Yes

  • Steps to reproduce the issue (command/config used to run Dgraph).
    my_id is indexed on exact in schema. Performing this mutation:

{
  set {
    _:test <pred_one> "one" .
    _:test <test> "" .
    _:test <my_id> "123" .
  }
}
  • Expected behaviour and actual result.
    Query should return no results:
{
  t as var(func: eq(my_id, "123")) @filter(has(test)) @cascade {
    p as pred_test
  }
  query(func: eq(my_id, "123")) @filter(uid(t) AND eq(val(p), "my test")) {
    expand(_all_)
  }
}

Instead, this error appears:
: Expected a valid value map. But got empty.

Modifying the query to be of this format returns the expected no results found:

{
  t as var(func: eq(my_id, "123")) @filter(has(test)) @cascade {
    p as pred_test
  }
  query(func: uid(t)) @filter(eq(my_id, "123") AND eq(val(p), "my test")) {
    expand(_all_)
  }
}
@danielmai
Copy link
Contributor

@srfrog Can you take a look at this?

@srfrog srfrog self-assigned this Sep 24, 2018
srfrog pushed a commit that referenced this issue Sep 25, 2018
When testing inequality value vars with non-matching values, the
response was sent as an error although it should return empty result
if the query has correct syntax.

Closes #2610
@manishrjain manishrjain added the kind/bug Something is broken. label Sep 25, 2018
srfrog added a commit that referenced this issue Sep 25, 2018
* An error was being returned when an empty response is expected.

When testing inequality value vars with non-matching values, the
response was sent as an error although it should return empty result
if the query has correct syntax.

Closes #2610
dna2github pushed a commit to dna2fork/dgraph that referenced this issue Jul 19, 2019
…ph-io#2611)

* An error was being returned when an empty response is expected.

When testing inequality value vars with non-matching values, the
response was sent as an error although it should return empty result
if the query has correct syntax.

Closes dgraph-io#2610
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something is broken.
Development

No branches or pull requests

4 participants