Skip to content

Absent uids are returned if querying via uid function #5817

@all-seeing-code

Description

@all-seeing-code

What version of Dgraph are you using?

Dgraph version : v2.0.0-rc1-452-g5c75240a3
Dgraph SHA-256 : c3fa23e3909376d2b5e567cbe963a81132c9c83e7e40b4051d56cba8105dece2
Commit SHA-1 : 5c75240
Commit timestamp : 2020-07-02 11:02:02 -0700
Branch : master
Go version : go1.14

Have you tried reproducing the issue with the latest release?

Yes

What is the hardware spec (RAM, OS)?

RAM: 16gig
OS: Linux/Ubuntu
Model name: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz

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

Query:

q (func: uid("0xa", "0xc")){
        uid
        name
    }

Expected behavior and actual result.

Expected results: It should not give any result or throw since uids have not been created.
Actual results:
It seems that uids are present but the predicate is missing in them.

{
  "q": [
    {
      "uid": "0xa"
    }, 
    {
      "uid": "0xc"
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/querylangIssues related to the query language specification and implementation.area/querylang/functionkind/bugSomething is broken.status/acceptedWe accept to investigate/work on it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions