You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/12/09 23:43:11 UTC

[jira] [Commented] (TINKERPOP-1036) Support self-looping edges in IO

    [ https://issues.apache.org/jira/browse/TINKERPOP-1036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15049516#comment-15049516 ] 

ASF GitHub Bot commented on TINKERPOP-1036:
-------------------------------------------

Github user spmallette commented on the pull request:

    https://github.com/apache/incubator-tinkerpop/pull/175#issuecomment-163424486
  
    hmm - i suppose it makes sense that this slipped through as we clearly don't have tests for self-loops.  
    
    I've created a JIRA issue for this: https://issues.apache.org/jira/browse/TINKERPOP-1036
    
    Unfortunately changes to IO are never terribly simple.  It will probably take a little back and forth discussion to cover all the bases...do you mind doing a little more legwork to get this PR ready to merge?  if so....
    
    can you please rename your PR to reference: TINKERPOP-1036 at the start of the title so that it will hook into our workflow?
    
    Next, my first question is whether or not you've determined if this a problem for our other two IO formats: gryo and graphson?
    
    finally, please move the test you did add to:
    
    https://github.com/apache/incubator-tinkerpop/blob/master/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java#L254
    
    I think that's the best place for it for right now.


> Support self-looping edges in IO
> --------------------------------
>
>                 Key: TINKERPOP-1036
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1036
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 3.1.0-incubating
>            Reporter: stephen mallette
>            Assignee: stephen mallette
>             Fix For: 3.1.1-incubating
>
>
> Seems like GraphSON is having trouble with self-loops.  Not sure about other IO at this time.
> {code}
> gremlin> a = TinkerGraph.open()
> ==>tinkergraph[vertices:0 edges:0]
> gremlin> v1 = a.addVertex()
> ==>v[0]
> gremlin> v2 = a.addVertex()
> ==>v[1]
> gremlin> control = v1.addEdge("CONTROL", v2)
> ==>e[2][0-CONTROL->1]
> gremlin> selfLoop = v1.addEdge("SELF-LOOP", v1)
> ==>e[3][0-SELF-LOOP->0]
> gremlin> a.io(IoCore.graphson()).writeGraph("test.gson")
> ==>null
> gremlin> b = TinkerGraph.open()
> ==>tinkergraph[vertices:0 edges:0]
> gremlin> b.io(IoCore.graphson()).readGraph("test.gson")
> ==>null
> gremlin> b.traversal().E()
> ==>e[2][0-CONTROL->1]
> {code}
> with graphson of:
> {code}
> {"id":0,"label":"vertex","inE":{"SELF-LOOP":[{"id":3,"outV":0}]},"outE":{"CONTROL":[{"id":2,"inV":1}]}}
> {"id":1,"label":"vertex","inE":{"CONTROL":[{"id":2,"outV":0}]}}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)