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

    https://github.com/apache/spark/pull/12836#discussion_r61710380
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/r/MapPartitionsRWrapper.scala
 ---
    @@ -33,8 +49,26 @@ private[sql] case class MapPartitionsRWrapper(
         broadcastVars: Array[Broadcast[Object]],
         inputSchema: StructType,
         outputSchema: StructType) extends (Iterator[Any] => Iterator[Any]) {
    +
       def apply(iter: Iterator[Any]): Iterator[Any] = {
    -    // If the content of current DataFrame is serialized R data?
    +    PartitionsRHelper.mapPartitionsRHelper(func,
    +       packageNames, broadcastVars, inputSchema, outputSchema, iter)
    +  }
    +}
    +
    +
    +object PartitionsRHelper {
    + /**
    +  * A helper function to run R UDFs on partitions
    +  */
    +  private[sql] def mapPartitionsRHelper(
    +    func: Array[Byte],
    +    packageNames: Array[Byte],
    +    broadcastVars: Array[Broadcast[Object]],
    +    inputSchema: StructType,
    +    outputSchema: StructType,
    +    iter: Iterator[Any]): Iterator[Any] = {
    --- End diff --
    
    style issue


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