Github user maropu commented on a diff in the pull request:
https://github.com/apache/spark/pull/5142#discussion_r27005726
--- Diff: graphx/src/main/scala/org/apache/spark/graphx/VertexRDD.scala ---
@@ -154,7 +154,30 @@ abstract class VertexRDD[VD](
* @return a VertexRDD containing the results of `f`
*/
def leftZipJoin[VD2: ClassTag, VD3: ClassTag]
- (other: VertexRDD[VD2])(f: (VertexId, VD, Option[VD2]) => VD3):
VertexRDD[VD3]
+ (other: VertexRDD[VD2])
+ (f: (VertexId, VD, Option[VD2]) => VD3)
+ : VertexRDD[VD3]
+
+ /**
+ * Left joins this RDD with another VertexRDD with the same index. This
function will fail if
+ * both VertexRDDs do not share the same index. The resulting vertex set
contains an entry for
+ * each vertex in `this`.
+ * If `other` is missing any vertex in this VertexRDD, `f` is passed
`None`.
+ *
+ * @tparam VD2 the attribute type of the other VertexRDD
+ * @tparam VD3 the attribute type of the resulting VertexRDD
+ * @tparam A the type of the given starting value and accumulator
+ *
+ * @param other the other VertexRDD with which to join.
+ * @param acc the initial value for the accumulator
+ * @param f the function mapping a vertex id and its attributes in this
and the other vertex set
+ * to a new vertex attribute.
+ * @return a VertexRDD containing the results of `f`
+ */
+ def leftZipJoinWithFold[VD2: ClassTag, VD3: ClassTag, A]
+ (other: VertexRDD[VD2], acc: A)
+ (f: (A, VertexId, VD, Option[VD2]) => VD3)
--- End diff --
ISTM, not 'acc' but 'initVal' would be better for an initial value.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]