Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2642

Comparability for NaN and nulltype

Agile BoardAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.5.1
    • None
    • process

    Description

      • Comparing on NaN should return no results.
      • Comparability throws exception today but should return nulltype when comparing incompatible types.
        • When Vertex /Edge/VertexProperty is compared, today it throws but it should return nulltype.
        • When nulltype is compared, today it throws an exception but it should return nulltype
      gremlin> g.addV().property('key',-5)
      ==>v[0]
      gremlin> g.addV().property('key',0)
      ==>v[2]
      gremlin> g.addV().property('key',5)
      ==>v[4]
      gremlin> g.addV().property('key',Double.NaN)
      ==>v[6]
      gremlin> g.V().values("key").is(lte(Double.NaN)) // 3.5.x
      ==>-5
      ==>0
      ==>NaN
      gremlin> g.V().values("key").is(gte(Double.NaN)) // 3.5.x
      ==>0
      ==>5
      ==>NaN
      gremlin> g.V().values("key").is(lt(Double.NaN)) // 3.5.x
      ==>-5
      gremlin> g.V().values("key").is(gt(Double.NaN)) // 3.5.x
      ==>5
      gremlin> g.V().values("key").is(lte(Double.NaN)) // proposed
      ==>NaN
      gremlin> g.V().values("key").is(gte(Double.NaN)) // proposed
      ==>NaN
      gremlin> g.V().values("key").is(lte(Double.NaN)) // proposed
      gremlin> g.V().values("key").is(gte(Double.NaN)) // proposed
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            spmallette Stephen Mallette

            Dates

              Created:
              Updated:

              Slack

                Issue deployment