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

Comparability for NaN and nulltype

    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

            People

              Unassigned Unassigned
              spmallette Stephen Mallette
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: