Skip to content

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

Merged
srfrog merged 2 commits into
masterfrom
feature/issue-2610_Invalid_error_for_semantically_correct_query
Sep 25, 2018
Merged

An error was being returned when an empty response is expected.#2611
srfrog merged 2 commits into
masterfrom
feature/issue-2610_Invalid_error_for_semantically_correct_query

Conversation

@srfrog
Copy link
Copy Markdown
Contributor

@srfrog srfrog commented 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


This change is Reviewable

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
Comment thread query/query.go Outdated
func (sg *SubGraph) ApplyIneqFunc() error {
if sg.Params.uidToVal == nil {
return x.Errorf("Expected a valid value map. But got empty.")
x.Println("Expected a valid value map. But got empty.")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can get rid of the println here. Just return nil

@manishrjain
Copy link
Copy Markdown
Contributor

LGTM. One comment.

Copy link
Copy Markdown
Contributor Author

@srfrog srfrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @manishrjain)


query/query.go, line 1637 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

You can get rid of the println here. Just return nil

Done. Added a comment for reference.

@srfrog srfrog merged commit cb4d922 into master Sep 25, 2018
@srfrog srfrog deleted the feature/issue-2610_Invalid_error_for_semantically_correct_query branch September 25, 2018 00:45
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request 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

None yet

Development

Successfully merging this pull request may close these issues.

2 participants