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

Gremlin Server Subgraph Cardinality Not Respected

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.3
    • 3.2.4
    • io
    • None

    Description

      The subgraph traversal step does not respect the cardinality of properties when executed on a graph remotely accessed from Gremlin Server. When queried, only one value of a multi-value property is returned. The following Java-based traversal illustrates the issue on The Crew graph. Below g is a Graph Traversal Source created using the withRemote() method on the EmptyGraph.

      GraphTraversal<Edge, Object> traversal =g.E().hasLabel("develops").subgraph("subgraph").cap("subgraph");
      
      TinkerGraph subgraph = (TinkerGraph)traversal.next();
      GraphTraversalSource sg = subgraph.traversal();
      
      GraphTraversal<Vertex, Object> locationTraversal = sg.V(1L).values("location");
      while (locationTraversal.hasNext()) {
          System.out.println(locationTraversal.next());
      }
      

      This traversal should return four locations

       {id=1, name=[marko], location=[san diego, santa cruz, brussels, santa fe], label=person} 

      however it only returns santa fe.

      Attachments

        Activity

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

          People

            spmallette Stephen Mallette
            HowIDoozitLarry Michael Margitus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment