Github user davies commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4629#discussion_r24778859
  
    --- Diff: core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala 
---
    @@ -330,6 +331,15 @@ private[spark] object PythonRDD extends Logging {
       }
     
       /**
    +   * Return an RDD of values from an RDD of (Long, Array[Byte]), with 
preservePartitions=true
    +   *
    +   * This is useful for PySpark to have the partitioner after partitionBy()
    +   */
    +  def valueOfPair(pair: JavaPairRDD[Long, Array[Byte]]): 
JavaRDD[Array[Byte]] = {
    --- End diff --
    
    In Scala/Java API, RDD.values() will change the RDD from (K, V) into RDD of 
V, so `preservePartitions` should not be `true`.
    
    For PySpark, it change the RDD from (hash, [(K, V)]) to (K, V), 
`preservePartitions` should be true.


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

Reply via email to