Github user andralungu commented on the pull request:
https://github.com/apache/flink/pull/818#issuecomment-112099290
Hi @vasia ,
In essence the `difference` method is just a fancy way of removing
vertices, right?
When you remove a vertex, you also remove the edge for which it was a
source/target.
Since the add/remove vertices methods work just for lists and collect is
"unsafe", we mutually agreed to overload `removeVertices` to work for data
sets.
This way you would duplicate the least amount of code. Otherwise, you would
take the exact code in the DataSet removeVertices and duplicate it in
difference. That's not very practical IMO.
Also, it may occur that a user has a DataSet of elements to remove. An
extra removeVertices won't really hurt then, would it?
But if you have suggestions on how to improve this, we are more than eager
to hear about them :)
-Andra
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---