Skip to content

comparator functions doesn't work correctly for the string type with the facets  #5843

@ahsanbarkati

Description

@ahsanbarkati

What version of Dgraph are you using?

v20.07.0-beta.Jun22-7-g73a9dd

Have you tried reproducing the issue with the latest release?

No

What is the hardware spec (RAM, OS)?

Not Relevant

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

Make the following mutation:

{
  set{
      <0x1a>  <testRel>  <0x1c>  (rational="abc",rational2=30,rational3=50) .
  }
}

The following query produces empty result:

{ 
    path as shortest( from:0x1a, to:0x1c, depth:6, numpaths:50 ){
          testRel @facets(eq(rational,"abc"))   @facets(rational)
    }    
    all (func:uid(path)){
         uid
         testRel @facets{
          uid
        }
    }
}

Expected behaviour and actual result.

The query should have returned the path as it does for the following query in which we apply eq() on non-string type facets:

{ 
    path as shortest( from:0x1a, to:0x1c, depth:6, numpaths:50 ){
          testRel @facets(eq(rational2, 30))   @facets(rational2)
    }    
    all (func:uid(path)){
         uid
         testRel @facets{
          uid
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/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