Dear Spark developers,

Could you suggest how to perform pattern matching on the type of the graph edge 
in the following scenario. I need to perform some math by means of 
aggregateMessages on the graph edges if edges are Double. Here is the code:
def my[VD: ClassTag, ED: ClassTag] (graph: Graph[VD, ED]): Double {
graph match {
   g: Graph[_, Double] => g.aggregateMessages[Double](t => t.sendToSrc(t.attr), 
_ + _).values.max
   _ => 0.0
}
}

However, it does not work, because aggregateMessages creates context t of type 
[VD, ED, Double]. I expect it to create context of [VD, Double, Double] because 
of the type pattern matching. Could you suggest what is the issue?

Best regards, Alexander

Reply via email to