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

ASF GitHub Bot commented on FLINK-2012:
---------------------------------------

Github user andralungu commented on the pull request:

    https://github.com/apache/flink/pull/678#issuecomment-105277029
  
    Hi @vasia, 
    
    I updated the addition methods to fit your suggestion. Feedback, for both 
of us in the future: discuss implementation details like just add vertices and 
remove the list of edges before the code is written. 98% of the people would 
have kept the edge list for compatibility with the addVertex method that we 
already had. 
    
    Regarding edge/vertex removal, I just changed the arg to List. A difference 
operator will not do us any good for various reasons: 
    - that worked for union because the DataSet also had an union operator
    - fromCollection() will never take an empty data set as a parameter so when 
you do removeVertices, you cannot use the difference operator. Workaround: 
generate an empty set by adding and removing an element. But really? 
    - when doing a "difference" on the vertices, you also need to remove the 
edges for which the vertex that disappeared was either source or target, so you 
will return a graph not a DataSet of vertices like is the case for union. 
Therefore a difference that operates on vertex data sets and returns a graph is 
exactly my removeVertices(). I guess you wanted to have Graph difference(graph) 
- back to argument 2. 
    
    Could you describe what you meant by a difference similar to union in more 
detail? 
    
    Thanks!
    Andra 
     


> addVertices, addEdges, removeVertices, removeEdges methods
> ----------------------------------------------------------
>
>                 Key: FLINK-2012
>                 URL: https://issues.apache.org/jira/browse/FLINK-2012
>             Project: Flink
>          Issue Type: New Feature
>          Components: Gelly
>    Affects Versions: 0.9
>            Reporter: Andra Lungu
>            Assignee: Andra Lungu
>            Priority: Minor
>
> Currently, Gelly only allows the addition/deletion of one vertex/edge at a 
> time. If a user would want to add two (or more) vertices, he/she would need 
> to add a vertex-> create a new graph; then add another vertex -> another 
> graph etc.  
> It would be nice to also have addVertices, addEdges, removeVertices, 
> removeEdges methods. 



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

Reply via email to