[
https://issues.apache.org/jira/browse/FLINK-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14976739#comment-14976739
]
Martin Junghanns commented on FLINK-2905:
-----------------------------------------
I totally agree with your definition of graph intersection. You are right, in
the transportation example, {{Graph.union}} would work, if you are interested
in all cities or - if only interested in the overlapping cities - use the
intersect graph and join it with the edge sets of the original graphs. Is this
what you meant?
Regarding your suggestion: if {{intersect}} looks at <src, trg>, this leads to
{code}
1, 3, 13 // G1
1, 3, 13 // G2
1, 3, 14 // G2 only
{code}
If {{intersect}} looks at <src, trg, val>, this leads to
{code}
1, 3, 13 // G1
1, 3, 13 // G2
{code}
Imho, {{1,3,14}} should not be in the intersect graph. Your suggestion is to
apply an UDF (a {{GroupReduceFunction}}?) at each group of common edges (e.g.
2x {{1,3,13}}) to produce a single edge. I was wondering, if we can also solve
use cases like transportation with union/join, I guess it would be ok to just
output a single edge per common edge group (as we both agreed would be
intuitive). Confusing, sorry :)
> Add intersect method to Graph class
> -----------------------------------
>
> Key: FLINK-2905
> URL: https://issues.apache.org/jira/browse/FLINK-2905
> Project: Flink
> Issue Type: New Feature
> Components: Gelly
> Affects Versions: 0.10
> Reporter: Martin Junghanns
> Assignee: Martin Junghanns
> Priority: Minor
>
> Currently, the Gelly Graph supports the set operations
> {{Graph.union(otherGraph)}} and {{Graph.difference(otherGraph)}}. It would be
> nice to have a {{Graph.intersect(otherGraph)}} method, where the resulting
> graph contains all vertices and edges contained in both input graphs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)