Github user greghogan commented on the pull request:

    https://github.com/apache/flink/pull/1900#issuecomment-214782976
  
    Hi @vasia,
    Comparing the APIs, `Translate` processes at the level of label or value 
whereas `mapVertices/Edges` process vertices and edges. What are use cases for 
the extra context (namely, the label) provided by `mapVertices/Edges`? 
Implementations of `Translator` can be reused across functions whereas the 
`MapFunction` provided to `mapVertices/Edges` are specific to that method. 
Would `mapLabels` require two new `MapFunction` or use an interface like 
`Translator`?
    
    `Translator` is wrapped by a specific `MapFunction` for each `Translate` 
function.
    
    Only one of the five current `Translate` functions operates on a `Graph`. 
`tranlateGraphLabels` could be moved to `Graph`, and there could be a 
`translateVertexValues` and `translateEdgeValues` also added to `Graph`. We 
don't always have a `Graph`, sometimes algorithms return a `DataSet` of 
vertices or edges, so having the static methods is helpful for these 
specialized `Vertex` and `Edge` operations.


---
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.
---

Reply via email to