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

    https://github.com/apache/spark/pull/10480#discussion_r50348037
  
    --- Diff: core/src/main/scala/org/apache/spark/api/r/SerDe.scala ---
    @@ -355,6 +355,13 @@ private[spark] object SerDe {
               writeInt(dos, v.length)
               v.foreach(elem => writeObject(dos, elem))
     
    +        // Handle Properties
    --- End diff --
    
    @shivaram as you see we are calling 3 different overloads of 
`read().jdbc()` in Scala, 4 if counting `write().jdbc()`. I think there would 
be 4 approaches to handle `read().jdbc()`:
      
    1. Have 3 JVM helper functions
    2. Have 1 helper function and on JVM side figure out which overload to 
route to
    3. Have 1 helper function and include parameter processing (eg. check 
numPartitions/defaultParallelism etc), and overload checks all within JVM - and 
leave R to be a thin shim
    4. serialize Properties as jobj and work on it on R side
    
    I feel #4 gives us the least overhead (less code) and more flexibility 
(since logic like default values for numPartition exists only on R/Python and 
not on Scala side).



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