Github user mengxr commented on the pull request:

    https://github.com/apache/spark/pull/4695#issuecomment-75123777
  
    If we return a `JavaPairRDD`, the user code looks like the following:
    
    ~~~
    for (Tuple2<Long, Int> assignment: assignments.collect()) {
      ... assignment._1() ...
      ... assignment._2() ...
    }
    ~~~
    
    With the current setting, this is 
    
    ~~~
    for (Assignment assignment: assignments.toJavaRDD().collect()) {
      ... assignment.id() ...
      ... assignment.cluster() ...
    }
    ~~~
    
    The latter is more readable to me. There is a cost on the user side if we 
force using a special class in the input, for example, `Rating` for `ALS` and 
`Document` for `LDA`. But for return types, the cost is not that high. Well, 
this is not a strong argument.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to