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

Inconsistent number comparison with Contains

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 3.2.4
    • None
    • process
    • None

    Description

      Steps to recreate:

      gremlin> conf = new BaseConfiguration()
      ==>org.apache.commons.configuration.BaseConfiguration@7048535f
      gremlin> conf.setProperty("gremlin.tinkergraph.vertexIdManager","LONG")
      ==>null
      gremlin> conf.setProperty("gremlin.tinkergraph.edgeIdManager","LONG")
      ==>null
      gremlin> graph = TinkerGraph.open(conf)
      ==>tinkergraph[vertices:0 edges:0]
      gremlin> graph.io(gryo()).readGraph('data/tinkerpop-modern.kryo')
      ==>null
      gremlin> g = graph.traversal()
      ==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
      gremlin> g.V().hasId(within(1..6)).out().hasId(within(1..6))
      gremlin> g.V().hasId(within(1..6)).out().hasId(between(0,7))
      ==>v[3]
      ==>v[2]
      ==>v[4]
      ==>v[5]
      ==>v[3]
      ==>v[3]
      

      `P.within` and `P.without` rely on `Collection.contains()` which ends up doing an Object type comparison during the equality check.

      Attachments

        Issue Links

          Activity

            Is this a duplicate of TINKERPOP-1048 ? Perhaps you just add this content to that ticket? or do you feel like this is something else?

            spmallette Stephen Mallette added a comment - Is this a duplicate of TINKERPOP-1048 ? Perhaps you just add this content to that ticket? or do you feel like this is something else?
            pluradj Jason Plurad added a comment -

            I'll move the scenario over to the other ticket. Consistency for this should be handled at the same time as the other issue.

            pluradj Jason Plurad added a comment - I'll move the scenario over to the other ticket. Consistency for this should be handled at the same time as the other issue.
            holleyism Adam Holley added a comment -

            I think the option step has the same issue when using count.
            g.V().choose(outE().count()).option(0, constant('no edges')).option(1, constant('one edge')) - does not work.
            g.V().choose(outE().count()).option(0L, constant('no edges')).option(1L, constant('one edge')) - does work

            holleyism Adam Holley added a comment - I think the option step has the same issue when using count. g.V().choose(outE().count()).option(0, constant('no edges')).option(1, constant('one edge')) - does not work. g.V().choose(outE().count()).option(0L, constant('no edges')).option(1L, constant('one edge')) - does work

            People

              Unassigned Unassigned
              pluradj Jason Plurad
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: