Github user ankurdave commented on the pull request:

    https://github.com/apache/spark/pull/2815#issuecomment-61386638
  
    This design looks good to me. The alternatives are all worse:
    
    @jegonzal It won't work to overload on the function type like that because 
of type erasure:
    
    ```
    $ scala
    scala> class A { def f(g: Int => Int): Int = g(1); def f(g: String => Int): 
Int = g("hello") }
    <console>:7: error: double definition:
    def f(g: Int => Int): Int at line 7 and
    def f(g: String => Int): Int at line 7
    have same type after erasure: (g: Function1)Int
           class A { def f(g: Int => Int): Int = g(1); def f(g: String => Int): 
Int = g("hello") }
    ```
    
    @rxin That will prevent us from passing triplet field information along, as 
we do in Pregel.


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