[ 
https://issues.apache.org/jira/browse/SPARK-6022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14353364#comment-14353364
 ] 

Brennon York commented on SPARK-6022:
-------------------------------------

The test is correct (in what I believe {{diff}} should do). Maybe [~ankurd] can 
chime in here? And you're also correct in that the code implementing {{diff}} 
doesn't currently work properly which is why I believe this test should 
correctly assess whether {{diff}} is operating correctly.

> GraphX `diff` test incorrectly operating on values (not VertexId's)
> -------------------------------------------------------------------
>
>                 Key: SPARK-6022
>                 URL: https://issues.apache.org/jira/browse/SPARK-6022
>             Project: Spark
>          Issue Type: Bug
>          Components: GraphX
>            Reporter: Brennon York
>
> The current GraphX {{diff}} test operates on values rather than the 
> VertexId's and, if {{diff}} were working properly (per 
> [SPARK-4600|https://issues.apache.org/jira/browse/SPARK-4600]), it should 
> fail this test. The code to test {{diff}} should look like the below as it 
> correctly generates {{VertexRDD}}'s with different {{VertexId}}'s to {{diff}} 
> against.
> {code}
> test("diff functionality with small concrete values") {
>     withSpark { sc =>
>       val setA: VertexRDD[Int] = VertexRDD(sc.parallelize(0L until 2L).map(id 
> => (id, id.toInt)))
>       // setA := Set((0L, 0), (1L, 1))
>       val setB: VertexRDD[Int] = VertexRDD(sc.parallelize(1L until 3L).map(id 
> => (id, id.toInt+2)))
>       // setB := Set((1L, 3), (2L, 4))
>       val diff = setA.diff(setB)
>       assert(diff.collect.toSet == Set((2L, 4)))
>     }
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to